You are here

public function Entity::init in Views (for Drupal 7) 8.3

Overrides Drupal\views\Plugin\views\row\RowPluginBase::init().

Overrides RowPluginBase::init

File

lib/Views/system/Plugin/views/row/Entity.php, line 57
Definition of Views\system\Plugin\views\row\Entity.

Class

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

Namespace

Views\system\Plugin\views\row

Code

public function init(ViewExecutable $view, &$display, $options = NULL) {
  parent::init($view, $display, $options);
  $this->entityType = $this->definition['entity_type'];
  $this->entityInfo = entity_get_info($this->entityType);
  $this->base_table = $this->entityInfo['base table'];
  $this->base_field = $this->entityInfo['entity keys']['id'];
}