preRenderByRelationship example

$relationship_table = $this->view->relationship[$this->options['relationship']]->alias;
    }
    $this->getEntityTranslationRenderer()->query($this->view->getQuery()$relationship_table);
  }

  /** * {@inheritdoc} */
  public function preRender($result) {
    parent::preRender($result);
    if ($result) {
      $this->getEntityTranslationRenderer()->preRenderByRelationship($resultisset($this->options['relationship']) ? $this->options['relationship'] : 'none');
    }
  }

  /** * {@inheritdoc} */
  public function render($row) {
    return $this->getEntityTranslationRenderer()->renderByRelationship($rowisset($this->options['relationship']) ? $this->options['relationship'] : 'none');
  }

  /** * {@inheritdoc} */
/** * {@inheritdoc} */
  public function query(QueryPluginBase $query$relationship = NULL) {
  }

  /** * {@inheritdoc} */
  public function preRender(array $result) {
    $this->preRenderByRelationship($result, 'none');
  }

  /** * Runs before each entity is rendered if a relationship is needed. * * @param \Drupal\views\ResultRow[] $result * The full array of results from the query. * @param string $relationship * The relationship to be used. */
  public function preRenderByRelationship(array $result, string $relationship): void {
    
Home | Imprint | This part of the site doesn't use cookies.