function linkit_entity_ctools_linkit_get_children in Linkit 7.2
Same name and namespace in other branches
- 7.3 plugins/linkit_search/entity.inc \linkit_entity_ctools_linkit_get_children()
1 call to linkit_entity_ctools_linkit_get_children()
- linkit_entity_ctools_linkit_get_child in plugins/
linkit_plugins/ entity.inc
1 string reference to 'linkit_entity_ctools_linkit_get_children'
- entity.inc in plugins/
linkit_plugins/ entity.inc - Linkit Entity Plugin.
File
- plugins/
linkit_plugins/ entity.inc, line 30 - Linkit Entity Plugin.
Code
function linkit_entity_ctools_linkit_get_children($plugin, $parent) {
$entities = entity_get_info();
$plugins = array();
foreach ($entities as $entity_type => $entity) {
// The entity must be linkit compatible and have an URI CALLBACK defined.
// See linkit_entity_info_alter().
if (!isset($entity['linkit']) || !$entity['linkit'] || !isset($entity['uri callback'])) {
continue;
}
$plugin['ui_title'] = $entity['label'];
$plugin['ui_description'] = t('Extend Linkit with @entity support.', array(
'@entity' => $entity_type,
));
$plugin['name'] = $parent . ':' . $entity_type;
$plugin['entity_type'] = $entity_type;
drupal_alter('linkit_plugin_entity', $plugin, $entity);
$plugins[$parent . ':' . $entity_type] = $plugin;
}
drupal_alter('linkit_plugin_entities', $plugins);
return $plugins;
}