function crumbs_EntityPlugin_Field_Abstract::describe in Crumbs, the Breadcrumbs suite 7.2
Parameters
crumbs_InjectedAPI_describeMultiPlugin $api:
string $entity_type:
array $keys:
Overrides crumbs_EntityPlugin::describe
File
- lib/
EntityPlugin/ Field/ Abstract.php, line 27
Class
Code
function describe($api, $entity_type, $keys) {
if (!empty($this->bundlesByType[$entity_type])) {
if ('user' === $entity_type) {
$instance = field_info_instance('user', $this->fieldKey, 'user');
foreach ($keys as $key => $title) {
$api
->addRule($key, $title);
}
$api
->descWithLabel($instance['label'], t('Field'));
}
foreach ($this->bundlesByType[$entity_type] as $bundle_name) {
if (isset($keys[$bundle_name])) {
$instance = field_info_instance($entity_type, $this->fieldKey, $bundle_name);
$api
->addRule($bundle_name, $keys[$bundle_name]);
$api
->descWithLabel($instance['label'], t('Field'), $bundle_name);
}
}
// $api->addDescription('(' . $this->fieldKey . ')');
}
}