Drupal 8  8.0.2
OpenDialogCommand Class Reference
Inheritance diagram for OpenDialogCommand:

Public Member Functions

 __construct ($selector, $title, $content, array $dialog_options=array(), $settings=NULL)
 
 getDialogOptions ()
 
 setDialogOptions ($dialog_options)
 
 setDialogOption ($key, $value)
 
 setDialogTitle ($title)
 
 render ()
 
- Public Member Functions inherited from CommandInterface
 render ()
 
 __construct ($selector)
 
 render ()
 
- Public Member Functions inherited from CommandWithAttachedAssetsInterface
 getAttachedAssets ()
 

Protected Attributes

 $selector
 
 $title
 
 $content
 
 $dialogOptions
 
 $settings
 
- Protected Attributes inherited from CommandInterface
 $selector
 

Detailed Description

Defines an AJAX command to open certain content in a dialog.

Constructor & Destructor Documentation

__construct (   $selector,
  $title,
  $content,
array  $dialog_options = array(),
  $settings = NULL 
)

Constructs an OpenDialogCommand object.

Parameters
string$selectorThe selector of the dialog.
string$titleThe title of the dialog.
string | array$contentThe content that will be placed in the dialog, either a render array or an HTML string.
array$dialog_options(optional) Options to be passed to the dialog implementation. Any jQuery UI option can be used. See http://api.jqueryui.com/dialog.
array | null$settings(optional) Custom settings that will be passed to the Drupal behaviors on the content of the dialog. If left empty, the settings will be populated automatically from the current request.

Member Function Documentation

getDialogOptions ( )

Returns the dialog options.

Returns
array
render ( )

Implements :render().

setDialogOption (   $key,
  $value 
)

Sets a single dialog option value.

Parameters
string$keyKey of the dialog option. Any jQuery UI option can be used. See http://api.jqueryui.com/dialog.
mixed$valueOption to be passed to the dialog implementation.
setDialogOptions (   $dialog_options)

Sets the dialog options array.

Parameters
array$dialog_optionsOptions to be passed to the dialog implementation. Any jQuery UI option can be used. See http://api.jqueryui.com/dialog.

Referenced by OpenDialogCommand\setDialogTitle().

Here is the caller graph for this function:

setDialogTitle (   $title)

Sets the dialog title (an alias of setDialogOptions).

Parameters
string$titleThe new title of the dialog.

References OpenDialogCommand\setDialogOptions().

Here is the call graph for this function:


The documentation for this class was generated from the following file: