public function EntityViewEvent::__construct in Hook Event Dispatcher 8
EntityViewEvent 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.
string $viewMode: The view mode the entity is rendered in.
Overrides BaseEntityEvent::__construct
File
- src/
Event/ Entity/ EntityViewEvent.php, line 48
Class
- EntityViewEvent
- Class EntityViewEvent.
Namespace
Drupal\hook_event_dispatcher\Event\EntityCode
public function __construct(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $viewMode) {
parent::__construct($entity);
$this->build =& $build;
$this->display = $display;
$this->viewMode = $viewMode;
}