function init($plugin) {
    // We modify the plugin info here so that we take the defaults and
    // twiddle, rather than completely override them.

    // Reset the edit path to match what we're really using.
    $plugin['menu']['items']['edit']['path'] = 'view/%ctools_export_ui/edit';
    $plugin['menu']['items']['clone']['path'] = 'view/%ctools_export_ui/clone';
    $plugin['menu']['items']['clone']['type'] = MENU_VISIBLE_IN_BREADCRUMB;
    $plugin['menu']['items']['export']['path'] = 'view/%ctools_export_ui/export';
    $plugin['menu']['items']['export']['type'] = MENU_VISIBLE_IN_BREADCRUMB;
    $plugin['menu']['items']['enable']['path'] = 'view/%ctools_export_ui/enable';
    $plugin['menu']['items']['disable']['path'] = 'view/%ctools_export_ui/disable';
    $plugin['menu']['items']['delete']['path'] = 'view/%ctools_export_ui/delete';
    $plugin['menu']['items']['delete']['type'] = MENU_VISIBLE_IN_BREADCRUMB;
    $plugin['menu']['items']['revert']['path'] = 'view/%ctools_export_ui/revert';
    $plugin['menu']['items']['revert']['type'] = MENU_VISIBLE_IN_BREADCRUMB;

    $prefix_count = count(explode('/', $plugin['menu']['menu prefix']));
    $plugin['menu']['items']['add-template'] = array(
      'path' => 'template/%/add',
      'title' => 'Add from template',
      'page callback' => 'ctools_export_ui_switcher_page',
      'page arguments' => array($plugin['name'], 'add_template', $prefix_count + 2),
      'load arguments' => array($plugin['name']),
      'access callback' => 'ctools_export_ui_task_access',
      'access arguments' => array($plugin['name'], 'add_template', $prefix_count + 2),
      'type' => MENU_CALLBACK,
    );

    return parent::init($plugin);
  }
 /**
  * Initialize the plugin with some modifications.
  */
 function init($plugin)
 {
     $plugin['menu']['items']['list callback']['access callback'] = 'user_access';
     $plugin['menu']['items']['list callback']['access arguments'] = array('administer custom help text');
     $plugin['menu']['items']['list']['title'] = 'List';
     $plugin['menu']['items']['edit callback']['type'] = MENU_VISIBLE_IN_BREADCRUMB;
     return parent::init($plugin);
 }
 function init($plugin)
 {
     parent::init($plugin);
     finder_inc('finder', 'finder_ui');
     ctools_include('ajax');
     drupal_add_css(drupal_get_path('module', 'finder_ui') . '/finder_ui.css');
     // These must be added up front because of a situation where all dropbuttons
     // start as ordinary buttons but then get ajaxed to dropbuttons.
     ctools_add_js('dropbutton');
     ctools_add_css('dropbutton');
     $modal_options = array('opacity' => 0.7, 'background' => '#000');
     drupal_add_js(array('finder-modal-style' => array('modalSize' => array('type' => 'fixed', 'width' => 1024, 'height' => 576, 'contentRight' => 0), 'modalTheme' => 'FinderUIModal', 'modalOptions' => $modal_options, 'closeImage' => '')), 'setting');
     drupal_add_js(drupal_get_path('module', 'finder_ui') . '/finder_ui.js');
 }
 function init($plugin) {
   parent::init($plugin);
   ctools_include('context');
 }
Esempio n. 5
0
 function init($plugin)
 {
     ctools_include('stylizer');
     $this->base_types = ctools_get_style_base_types();
     parent::init($plugin);
 }