You are here

function _workbench_create in Workbench 7

Emulate node/add to return content creation list.

Return value

A Render API array of content creation options.

1 call to _workbench_create()
workbench_create in ./workbench.pages.inc
Simple page to show list of content type to create.

File

./workbench.pages.inc, line 103
Workbench page callbacks.

Code

function _workbench_create() {
  $output = array();
  $output['#markup'] = '<h3>' . t('Create content') . '</h3>';
  $item = menu_get_item('node/add');
  $content = system_admin_menu_block($item);
  if (!empty($content)) {

    // Theme the arrray of content type creation links.
    $output['#markup'] .= theme('node_add_list', array(
      'content' => $content,
    ));
  }
  else {
    $output['#markup'] .= t('You cannot create any new content. Please contact the site administrator.');
  }
  return $output;
}