ds-8.x-3.9/src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php

src/Plugin/views/Entity/Render/CurrentLanguageRenderer.php
<?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();
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc