本文整理汇总了PHP中ctools_export_ui::init方法的典型用法代码示例。如果您正苦于以下问题:PHP ctools_export_ui::init方法的具体用法?PHP ctools_export_ui::init怎么用?PHP ctools_export_ui::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ctools_export_ui
的用法示例。
在下文中一共展示了ctools_export_ui::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
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);
}
示例2: init
/**
* 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);
}
示例3: init
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');
}
示例4: init
function init($plugin) {
parent::init($plugin);
ctools_include('context');
}
示例5: init
function init($plugin)
{
ctools_include('stylizer');
$this->base_types = ctools_get_style_base_types();
parent::init($plugin);
}