public static function AutoEntityLabelManager::auto_entitylabel_options in Automatic Entity Label 8
Same name and namespace in other branches
- 8.3 src/AutoEntityLabelManager.php \Drupal\auto_entitylabel\AutoEntityLabelManager::auto_entitylabel_options()
- 8.2 src/AutoEntityLabelManager.php \Drupal\auto_entitylabel\AutoEntityLabelManager::auto_entitylabel_options()
Constructs the list of options for the given bundle.
@codingStandardsIgnoreStart
File
- src/
AutoEntityLabelManager.php, line 325
Class
- AutoEntityLabelManager
- AutoEntityLabelManager class.
Namespace
Drupal\auto_entitylabelCode
public static function auto_entitylabel_options($entity_type, $bundle_name) {
// @codingStandardsIgnoreEnd
$options = [
'auto_entitylabel_disabled' => t('Disabled'),
];
if (self::auto_entitylabel_entity_label_visible($entity_type)) {
$options += [
'auto_entitylabel_enabled' => t('Automatically generate the label and hide the label field'),
'auto_entitylabel_optional' => t('Automatically generate the label if the label field is left empty'),
];
}
else {
$options += [
'auto_entitylabel_enabled' => t('Automatically generate the label'),
];
}
return $options;
}