public function EntityRow::init

Initialize the plugin.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The display handler.

array $options: The options configured for this plugin.

Overrides PluginBase::init

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php, line 76
Contains \Drupal\views\Plugin\views\row\EntityRow.

Class

EntityRow
Generic entity row plugin to provide a common base for all entity types.

Namespace

Drupal\views\Plugin\views\row

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
  parent::init($view, $display, $options);
  $this->entityType = $this->definition['entity_type'];
  $this->entityInfo = $this->entityManager
    ->getDefinition($this->entityType);
  $this->base_table = $this->entityInfo['base_table'];
  $this->base_field = $this->entityInfo['entity_keys']['id'];
}