You are here

function fieldable_panels_panes_entities_add_page in Fieldable Panels Panes (FPP) 7

Page callback to add a new pane entity.

Parameters

string $type: The FPP type to process.

1 string reference to 'fieldable_panels_panes_entities_add_page'
fieldable_panels_panes_menu in ./fieldable_panels_panes.module
Implements hook_menu().

File

includes/admin.inc, line 99
Contains administrative pages and functions for fieldable entity panes.

Code

function fieldable_panels_panes_entities_add_page($type) {
  $form_state = array(
    'entity' => fieldable_panels_panes_create(array(
      'bundle' => $type,
    )),
    'add submit' => TRUE,
  );

  // Default these to reusable.
  $form_state['entity']->reusable = TRUE;
  return drupal_build_form('fieldable_panels_panes_entity_edit_form', $form_state);
}