function workspace_get_types in Workspace 7
2 calls to workspace_get_types()
- workspace_add_form in ./
workspace.module - Form definition for content addition form.
- workspace_list_form in ./
workspace.module
File
- ./
workspace.module, line 683 - Presents a user-centric view of content.
Code
function workspace_get_types() {
global $user;
$select = t('Select...');
$options = array(
$select => $select,
);
foreach (node_type_get_types() as $type => $object) {
if (module_invoke_all('node_access', $type, 'create', $user)) {
$options[$type] = $object->name;
}
}
if (count($options) == 1) {
return FALSE;
}
return $options;
}