class AlterEntityBrowserDisplayData in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Events/AlterEntityBrowserDisplayData.php \Drupal\entity_browser\Events\AlterEntityBrowserDisplayData
Allows data for an entity browser element to be altered.
Hierarchy
- class \Drupal\entity_browser\Events\EventBase extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\entity_browser\Events\AlterEntityBrowserDisplayData
Expanded class hierarchy of AlterEntityBrowserDisplayData
2 files declare their use of AlterEntityBrowserDisplayData
- IFrame.php in src/
Plugin/ EntityBrowser/ Display/ IFrame.php - Modal.php in src/
Plugin/ EntityBrowser/ Display/ Modal.php
File
- src/
Events/ AlterEntityBrowserDisplayData.php, line 10
Namespace
Drupal\entity_browser\EventsView source
class AlterEntityBrowserDisplayData extends EventBase {
/**
* Data to process.
*
* @var array
*/
protected $data;
/**
* Form state object.
*
* @var \Drupal\Core\Form\FormStateInterface
*/
protected $formState;
/**
* Plugin definition.
*
* @var array
*/
protected $pluginDefinition;
/**
* Constructs a EntitySelectionEvent object.
*
* @param string $entity_browser_id
* Entity browser ID.
* @param string $instance_uuid
* Entity browser instance UUID.
* @param array $plugin_definition
* Plugin definition.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* Form state object.
* @param array $data
* Data to process.
*/
public function __construct($entity_browser_id, $instance_uuid, array $plugin_definition, FormStateInterface $form_state, array $data) {
parent::__construct($entity_browser_id, $instance_uuid);
$this->data = $data;
$this->formState = $form_state;
$this->pluginDefinition = $plugin_definition;
}
/**
* Gets form state.
*
* @return \Drupal\Core\Form\FormStateInterface
* Form state object.
*/
public function getFormState() {
return $this->formState;
}
/**
* Gets data array.
*
* @return array
* Data array.
*/
public function getData() {
return $this->data;
}
/**
* Gets plugin definition array.
*
* @return array
* Plugin definition array.
*/
public function getPluginDefinition() {
return $this->pluginDefinition;
}
/**
* Sets data array.
*
* @param array $data
* Data array.
*/
public function setData($data) {
$this->data = $data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AlterEntityBrowserDisplayData:: |
protected | property | Data to process. | |
AlterEntityBrowserDisplayData:: |
protected | property | Form state object. | |
AlterEntityBrowserDisplayData:: |
protected | property | Plugin definition. | |
AlterEntityBrowserDisplayData:: |
public | function | Gets data array. | |
AlterEntityBrowserDisplayData:: |
public | function | Gets form state. | |
AlterEntityBrowserDisplayData:: |
public | function | Gets plugin definition array. | |
AlterEntityBrowserDisplayData:: |
public | function | Sets data array. | |
AlterEntityBrowserDisplayData:: |
public | function |
Constructs a EntitySelectionEvent object. Overrides EventBase:: |
|
EventBase:: |
protected | property | Entity browser id. | |
EventBase:: |
protected | property | Entity browser instance UUID. | |
EventBase:: |
public | function | Gets the entity browser ID:. | |
EventBase:: |
public | function | Gets the entity browser instance UUID:. |