You are here

public function RenderedEntity::query in Entity API 8.0

Called to add the field to a query.

Overrides FieldPluginBase::query

File

src/Plugin/views/field/RenderedEntity.php, line 160
Contains \Drupal\entity\Plugin\views\field\RenderedEntity.

Class

RenderedEntity
Provides a field handler which renders an entity in a certain view mode.

Namespace

Drupal\entity\Plugin\views\field

Code

public function query() {

  // We purposefully do not call parent::query() because we do not want the
  // default query behavior for Views fields. Instead, let the entity
  // translation renderer provide the correct query behavior.
  if ($this->languageManager
    ->isMultilingual()) {
    $this
      ->getEntityTranslationRenderer()
      ->query($this->query, $this->relationship);
  }
}