abstract class crumbs_MultiPlugin_EntityFindAbstract in Crumbs, the Breadcrumbs suite 7.2
Hierarchy
- class \crumbs_MultiPlugin_EntityFindAbstract implements crumbs_MultiPlugin
Expanded class hierarchy of crumbs_MultiPlugin_EntityFindAbstract
File
- lib/
MultiPlugin/ EntityFindAbstract.php, line 3
View source
abstract class crumbs_MultiPlugin_EntityFindAbstract implements crumbs_MultiPlugin {
/**
* @var crumbs_EntityPlugin
*/
protected $plugin;
/**
* Helper method for describe()
*
* @param crumbs_InjectedAPI_describeMultiPlugin $api
* @param string $entity_type
* @param string $label
* @return array
*/
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;
}
}
/**
* @param crumbs_EntityPlugin $plugin
* The object that can actually determine a parent path for the entity.
*/
function __construct($plugin) {
$this->plugin = $plugin;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
crumbs_MultiPlugin:: |
function | 11 | ||
crumbs_MultiPlugin_EntityFindAbstract:: |
protected | property | ||
crumbs_MultiPlugin_EntityFindAbstract:: |
protected | function | Helper method for describe() | |
crumbs_MultiPlugin_EntityFindAbstract:: |
function | 1 |