function flexiform_user_categories in Flexiform 7
Implements hook_user_categories()
Add any user categories being created by flexiforms.
File
- ./
flexiform.module, line 126 - Module for the Flexiform system.
Code
function flexiform_user_categories() {
$categories = array();
/** @var \FlexiformController $controller */
$controller = entity_get_controller('flexiform');
foreach ($controller
->loadWithDisplay('FlexiformDisplayUserCategory') as $form) {
$display = $form
->getDisplay('FlexiformDisplayUserCategory');
$categories = array_merge($categories, $display
->hook_user_categories());
}
return $categories;
}