You are here

public static function AutoEntityLabelManager::auto_entitylabel_entity_label_visible in Automatic Entity Label 8.2

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

Check if given entity bundle has a visible label on the entity form.

@todo Find a generic way of determining the result of this function. This will probably require access to more information about entity forms (entity api module?).

@codingStandardsIgnoreStart

Parameters

string $entity_type: The entity type.

Return value

bool TRUE if the label is rendered in the entity form, FALSE otherwise.

1 call to AutoEntityLabelManager::auto_entitylabel_entity_label_visible()
AutoEntityLabelManager::auto_entitylabel_options in src/AutoEntityLabelManager.php
Constructs the list of options for the given bundle.

File

src/AutoEntityLabelManager.php, line 385

Class

AutoEntityLabelManager
Class for Auto Entity Label Manager.

Namespace

Drupal\auto_entitylabel

Code

public static function auto_entitylabel_entity_label_visible($entity_type) {

  // @codingStandardsIgnoreEnd
  $hidden = [
    'profile2' => TRUE,
  ];
  return empty($hidden[$entity_type]);
}