Skip to content
Snippets Groups Projects
Commit 1a4028ee authored by narendra-drupal's avatar narendra-drupal
Browse files

addressed 40.2

parent 8e16554c
No related branches found
No related tags found
1 merge request!5708Resolve #2473989 "Lack of dynamic"
......@@ -17,8 +17,8 @@ class FieldLanguage extends EntityField {
* {@inheritdoc}
*/
public function access(AccountInterface $account) {
// Don't display the field in case the site is not multilingual, because
// there is no point in doing so.
// No point in displaying the language field on monolingual sites,
// as only one language value is available.
return $this->languageManager->isMultilingual() && parent::access($account);
}
......
......@@ -72,8 +72,8 @@ public function getValueOptions() {
* {@inheritdoc}
*/
public function query() {
// Don't filter by language in case the site is not multilingual, because
// there is no point in doing so.
// No point in displaying the language filter on monolingual sites,
// as only one language value is available.
if (!$this->languageManager->isMultilingual()) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment