function FieldLanguage::access

Same name and namespace in other branches
  1. 10 core/modules/views/src/Plugin/views/field/FieldLanguage.php \Drupal\views\Plugin\views\field\FieldLanguage::access()

Overrides EntityField::access

File

core/modules/views/src/Plugin/views/field/FieldLanguage.php, line 19

Class

FieldLanguage
Displays the language of an entity.

Namespace

Drupal\views\Plugin\views\field

Code

public function access(AccountInterface $account) : bool {
    // No point in displaying the language field on monolingual sites,
    // as only one language value is available.
    return $this->languageManager
        ->isMultilingual() && parent::access($account);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.