1 entityreference.module | _entityreference_behavior_plugins() |
Get all behavior plugins implemented by any module.
File
- core/
modules/ entityreference/ entityreference.module, line 1490 - Entityreference primary module file.
Code
function _entityreference_behavior_plugins() {
$plugins = &backdrop_static(__FUNCTION__);
if (!empty($plugins)) {
return $plugins;
}
$plugins = array();
$default = array(
'description' => '',
'behavior type' => 'field',
'access callback' => FALSE,
'force enabled' => FALSE,
);
foreach (module_implements('entityreference_behavior_plugins') as $module) {
$behavior_plugins = module_invoke($module, 'entityreference_behavior_plugins');
foreach ($behavior_plugins as $plugin_name => $plugin) {
$plugin = $plugin + $default;
$behavior_plugins[$plugin_name] = $plugin;
}
$plugins = $plugins + $behavior_plugins;
}
return $plugins;
}