TranslationLanguageRenderer.php in Views Parity Row 8
File
src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php
View source
<?php
declare (strict_types=1);
namespace Drupal\views_parity_row\Plugin\views\Entity\Render;
use Drupal\views\Plugin\views\query\QueryPluginBase;
use Drupal\views\ResultRow;
class TranslationLanguageRenderer extends RendererBase {
protected $langcodeAlias;
public function getLangcode(ResultRow $row) {
return isset($row->{$this->langcodeAlias}) ? $row->{$this->langcodeAlias} : $this->languageManager
->getCurrentLanguage()
->getId();
}
public function query(QueryPluginBase $query, $relationship = NULL) {
}
public function render(ResultRow $row) {
$entity_id = $row->_entity
->id();
return $this->build[$entity_id];
}
}