Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldLanguage.php

function 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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal