You are here

protected function DisplayPluginBase::isBaseTableTranslatable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::isBaseTableTranslatable()

Returns whether the base table is of a translatable entity type.

Return value

bool TRUE if the base table is of a translatable entity type, FALSE otherwise.

2 calls to DisplayPluginBase::isBaseTableTranslatable()
DisplayPluginBase::buildOptionsForm in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Provide a form to edit options for this plugin.
DisplayPluginBase::optionsSummary in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Provides the default summary for options in the views UI.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2659
Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

protected function isBaseTableTranslatable() {
  $view_base_table = $this->view->storage
    ->get('base_table');
  $views_data = Views::viewsData()
    ->get($view_base_table);
  if (!empty($views_data['table']['entity type'])) {
    $entity_type_id = $views_data['table']['entity type'];
    return \Drupal::entityManager()
      ->getDefinition($entity_type_id)
      ->isTranslatable();
  }
  return FALSE;
}