
| Current Path : /var/www/html/c12park/web/core/modules/views/src/Plugin/views/field/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/c12park/web/core/modules/views/src/Plugin/views/field/FieldLanguage.php |
<?php
namespace Drupal\views\Plugin\views\field;
use Drupal\Core\Session\AccountInterface;
use Drupal\views\Attribute\ViewsField;
/**
* Displays the language of an entity.
*
* @ingroup views_field_handlers
*/
#[ViewsField("field_language")]
class FieldLanguage extends EntityField {
/**
* {@inheritdoc}
*/
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);
}
}