You are here

public function EntityReference_SelectionHandler_Generic::getLabel in Entity reference 7

Implements EntityReferenceHandler::getLabel().

Overrides EntityReference_SelectionHandler::getLabel

1 call to EntityReference_SelectionHandler_Generic::getLabel()
EntityReference_SelectionHandler_Generic::getReferencableEntities in plugins/selection/EntityReference_SelectionHandler_Generic.class.php
Implements EntityReferenceHandler::getReferencableEntities().
1 method overrides EntityReference_SelectionHandler_Generic::getLabel()
EntityReference_SelectionHandler_Generic_file::getLabel in plugins/selection/EntityReference_SelectionHandler_Generic.class.php
Implements EntityReferenceHandler::getLabel().

File

plugins/selection/EntityReference_SelectionHandler_Generic.class.php, line 310

Class

EntityReference_SelectionHandler_Generic
A generic Entity handler.

Code

public function getLabel($entity) {
  $target_type = $this->field['settings']['target_type'];
  return entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t(ENTITYREFERENCE_DENIED);
}