You are here

function boxes_workbench_create_alter in Boxes 7.2

Implements hook_workbench_create_alter().

File

./boxes.module, line 817

Code

function boxes_workbench_create_alter(&$output) {
  $items = array();
  $i = 0;
  foreach (boxes_get_types() as $box_type) {
    $items[str_replace(' ', '', $box_type
      ->getLabel()) . '_' . $i] = array(
      'title' => $box_type
        ->getLabel(),
      'href' => 'block/add/' . $box_type
        ->buildURL(),
      'description' => $box_type
        ->getDescription(),
      'localized_options' => array(),
    );
    $i++;
  }
  ksort($blocks);
  $output['box_types'] = array(
    '#title' => t('Create Blocks'),
    '#markup' => theme('node_add_list', array(
      'content' => $items,
    )),
    '#theme' => 'workbench_element',
  );
}