CurrentLanguageRenderer.php in Display Suite 8.3
Same filename and directory in other branches
Namespace
Drupal\ds\Plugin\views\Entity\RenderFile
src/Plugin/views/Entity/Render/CurrentLanguageRenderer.phpView source
<?php
namespace Drupal\ds\Plugin\views\Entity\Render;
use Drupal\views\ResultRow;
/**
* Renders entities in the current language.
*/
class CurrentLanguageRenderer extends RendererBase {
/**
* Returns NULL so that the current language is used.
*
* @param \Drupal\views\ResultRow $row
* The result row.
*
* @return string
*/
public function getLangcode(ResultRow $row) {
return $this->languageManager
->getCurrentLanguage()
->getId();
}
}
Classes
Name | Description |
---|---|
CurrentLanguageRenderer | Renders entities in the current language. |