You are here

function bean_add in Bean (for Drupal 7) 7

Add bean page callback

1 string reference to 'bean_add'
bean_menu in ./bean.module
Implements hook_menu().

File

includes/bean.pages.inc, line 31
Bean Functions

Code

function bean_add($type) {
  $bean = bean_create(array(
    'type' => $type,
  ));
  $bean_type = bean_type_load($type);
  drupal_set_title(t('Create @type block', array(
    '@type' => $bean_type
      ->getLabel(),
  )), PASS_THROUGH);
  return drupal_get_form('bean_form', $bean, $type);
}