function power_menu_get_all_property_definitions in Power Menu 7
Same name and namespace in other branches
- 6 power_menu.module \power_menu_get_all_property_definitions()
@todo Please document this function.
See also
3 calls to power_menu_get_all_property_definitions()
- power_menu_block_info in ./
power_menu.module - Implements hook_block_info().
- power_menu_block_view in ./
power_menu.module - Implements hook_block_view().
- power_menu_preprocess_page in ./
power_menu.module - Implements hook_preproces_page().
File
- ./
power_menu.module, line 713 - This module provides some additional menu features. The features are not actually new, but are part of other modules. it's though very cumbersome to creating a new menu item, because one has to go to all the different places to configure these…
Code
function power_menu_get_all_property_definitions() {
if ($cache = cache_get('power_menu_properties', 'cache')) {
$properties = $cache->data;
}
else {
$dir = dir(drupal_get_path('module', 'power_menu') . '/properties');
$properties = array();
while ($filename = $dir
->read()) {
$file = $dir->path . '/' . $filename;
if (filetype($file) == 'file') {
include_once DRUPAL_ROOT . '/' . $file;
$properties = array_merge($properties, module_invoke(str_replace(".inc", '', $filename), 'power_menu_properties'));
}
}
$dir
->close();
$properties = array_merge($properties, module_invoke_all('power_menu_properties'));
cache_set('power_menu_properties', $properties, 'cache');
}
return $properties;
}