You are here

function hook_auto_entitylabel_label_alter in Automatic Entity Label 8.3

Same name and namespace in other branches
  1. 8.2 auto_entitylabel.api.php \hook_auto_entitylabel_label_alter()

Provide post-processing of auto generated titles (labels).

Parameters

string $label: The auto-generated label to be altered.

object $entity: The entity that the label is from.

See also

\Drupal\auto_entitylabel\AutoEntityLabelManager::generateLabel()

1 invocation of hook_auto_entitylabel_label_alter()
AutoEntityLabelManager::generateLabel in src/AutoEntityLabelManager.php
Generates the label according to the settings.

File

./auto_entitylabel.api.php, line 18
API documentation for Automatic Entity Label module.

Code

function hook_auto_entitylabel_label_alter(&$label, $entity) {

  // Trim the label.
  $label = trim($label);
}