You are here

function hook_auto_entitylabel_title_alter in Automatic Entity Label 7

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

Parameters

array $titles: Array of titles keyed by langcode.

object $entity: The entity that the titles are from.

See also

auto_entitylabel_set_title

1 invocation of hook_auto_entitylabel_title_alter()
auto_entitylabel_set_title in ./auto_entitylabel.module
Sets the automatically generated entitylabel for the entity.

File

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

Code

function hook_auto_entitylabel_title_alter(&$titles, $entity) {

  // Trim the title.
  foreach ($titles as $k => $v) {
    $titles[$k] = trim($v);
  }
}