You are here

public function AutoEntityLabelManager::hasOptionalAutoLabel in Automatic Entity Label 8

Same name and namespace in other branches
  1. 8.3 src/AutoEntityLabelManager.php \Drupal\auto_entitylabel\AutoEntityLabelManager::hasOptionalAutoLabel()
  2. 8.2 src/AutoEntityLabelManager.php \Drupal\auto_entitylabel\AutoEntityLabelManager::hasOptionalAutoLabel()

Determines if the entity bundle has an optional automatic label.

Optional means that if the label is empty, it will be automatically generated.

Return value

bool True if the entity bundle has an optional automatic label.

Overrides AutoEntityLabelManagerInterface::hasOptionalAutoLabel

1 call to AutoEntityLabelManager::hasOptionalAutoLabel()
AutoEntityLabelManager::autoLabelNeeded in src/AutoEntityLabelManager.php
Returns whether the automatic label has to be set.

File

src/AutoEntityLabelManager.php, line 164

Class

AutoEntityLabelManager
AutoEntityLabelManager class.

Namespace

Drupal\auto_entitylabel

Code

public function hasOptionalAutoLabel() {
  return $this
    ->getConfig('status') == self::OPTIONAL;
}