EntityFindAbstract.php in Crumbs, the Breadcrumbs suite 7.2
File
lib/MultiPlugin/EntityFindAbstract.php
View source
<?php
abstract class crumbs_MultiPlugin_EntityFindAbstract implements crumbs_MultiPlugin {
protected $plugin;
protected function describeGeneric($api, $entity_type, $label) {
$info = entity_get_info($entity_type);
$keys = array();
foreach ($info['bundles'] as $bundle_key => $bundle) {
$keys[$bundle_key] = t('!key: !value', array(
'!key' => $label,
'!value' => $bundle['label'],
));
}
if (method_exists($this->plugin, 'describe')) {
$keys = $this->plugin
->describe($api, $entity_type, $keys);
return $keys;
}
else {
return $keys;
}
}
function __construct($plugin) {
$this->plugin = $plugin;
}
}