class LayoutParagraphsEventCommand in Layout Paragraphs 2.0.x
Class ExampleCommand.
Hierarchy
- class \Drupal\layout_paragraphs\Ajax\LayoutParagraphsEventCommand implements CommandInterface
Expanded class hierarchy of LayoutParagraphsEventCommand
3 files declare their use of LayoutParagraphsEventCommand
- DeleteComponentForm.php in src/
Form/ DeleteComponentForm.php - EditComponentForm.php in src/
Form/ EditComponentForm.php - InsertComponentForm.php in src/
Form/ InsertComponentForm.php
1 string reference to 'LayoutParagraphsEventCommand'
- LayoutParagraphsEventCommand::render in src/
Ajax/ LayoutParagraphsEventCommand.php - Render custom ajax command.
File
- src/
Ajax/ LayoutParagraphsEventCommand.php, line 10
Namespace
Drupal\layout_paragraphs\AjaxView source
class LayoutParagraphsEventCommand implements CommandInterface {
/**
* The layout object.
*
* @var \Drupal\layout_paragraphs\LayoutParagraphsLayout
*/
protected $layout;
/**
* The component uuid.
*
* @var string
*/
protected $componentUuid;
/**
* The event to trigger.
*
* @var string
*/
protected $eventName;
/**
* Constructor.
*/
public function __construct($layout, $component_uuid, $event_name) {
$this->layout = $layout;
$this->componentUuid = $component_uuid;
$this->eventName = $event_name;
}
/**
* Render custom ajax command.
*
* @return array
* The command array.
*/
public function render() {
return [
'command' => 'LayoutParagraphsEventCommand',
'layoutId' => $this->layout
->id(),
'componentUuid' => $this->componentUuid,
'eventName' => $this->eventName,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LayoutParagraphsEventCommand:: |
protected | property | The component uuid. | |
LayoutParagraphsEventCommand:: |
protected | property | The event to trigger. | |
LayoutParagraphsEventCommand:: |
protected | property | The layout object. | |
LayoutParagraphsEventCommand:: |
public | function |
Render custom ajax command. Overrides CommandInterface:: |
|
LayoutParagraphsEventCommand:: |
public | function | Constructor. |