public function EntityViewAlterEvent::__construct in Hook Event Dispatcher 8
EntityViewAlterEventEvent constructor.
Parameters
array &$build: A renderable array representing the entity content. The module may add elements to $build prior to rendering. The structure of $build is a renderable array as expected by drupal_render().
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display holding the display options configured for the entity components.
Overrides BaseEntityEvent::__construct
File
- src/
Event/ Entity/ EntityViewAlterEvent.php, line 40
Class
- EntityViewAlterEvent
- Class EntityViewAlterEventEvent.
Namespace
Drupal\hook_event_dispatcher\Event\EntityCode
public function __construct(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
parent::__construct($entity);
$this->build =& $build;
$this->display = $display;
}