class crumbs_EntityPlugin_Field_EntityReference in Crumbs, the Breadcrumbs suite 7.2
Hierarchy
- class \crumbs_EntityPlugin_Field_Abstract implements crumbs_EntityPlugin
Expanded class hierarchy of crumbs_EntityPlugin_Field_EntityReference
File
- lib/
EntityPlugin/ Field/ EntityReference.php, line 3
View source
class crumbs_EntityPlugin_Field_EntityReference extends crumbs_EntityPlugin_Field_Abstract {
/**
* {@inheritdoc}
*/
function fieldFindCandidate(array $items) {
$field = $this
->getFieldInfo();
if ($target_type = $field['settings']['target_type']) {
foreach ($items as $item) {
if (1 && !empty($item['target_id']) && ($target_entities = entity_load($target_type, array(
$item['target_id'],
))) && ($uri = entity_uri($target_type, reset($target_entities)))) {
return $uri['path'];
}
}
}
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
crumbs_EntityPlugin_Field_Abstract:: |
protected | property | ||
crumbs_EntityPlugin_Field_Abstract:: |
protected | property | ||
crumbs_EntityPlugin_Field_Abstract:: |
function |
Overrides crumbs_EntityPlugin:: |
||
crumbs_EntityPlugin_Field_Abstract:: |
function |
Overrides crumbs_EntityPlugin:: |
||
crumbs_EntityPlugin_Field_Abstract:: |
protected | function | ||
crumbs_EntityPlugin_Field_Abstract:: |
function | |||
crumbs_EntityPlugin_Field_EntityReference:: |
function |
Overrides crumbs_EntityPlugin_Field_Abstract:: |