当前位置: 首页>>代码示例>>PHP>>正文


PHP ctools_export_ui::hook_menu方法代码示例

本文整理汇总了PHP中ctools_export_ui::hook_menu方法的典型用法代码示例。如果您正苦于以下问题:PHP ctools_export_ui::hook_menu方法的具体用法?PHP ctools_export_ui::hook_menu怎么用?PHP ctools_export_ui::hook_menu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ctools_export_ui的用法示例。


在下文中一共展示了ctools_export_ui::hook_menu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

 function hook_menu(&$items)
 {
     // Change the item to a tab.
     $this->plugin['menu']['items']['list']['type'] = MENU_LOCAL_TASK;
     $this->plugin['menu']['items']['list']['weight'] = -6;
     $this->plugin['menu']['items']['list']['title'] = 'List defaults';
     // menu local actions are weird.
     $this->plugin['menu']['items']['add']['path'] = 'list/add';
     $this->plugin['menu']['items']['import']['path'] = 'list/import';
     // Edit is being handled elsewhere.
     unset($this->plugin['menu']['items']['edit callback']);
     unset($this->plugin['menu']['items']['access']);
     foreach (panelizer_operations() as $path => $operation) {
         $location = isset($operation['ui path']) ? $operation['ui path'] : $path;
         if (isset($this->plugin['menu']['items'][$location])) {
             unset($this->plugin['menu']['items'][$location]);
         }
     }
     // Change the callbacks for everything.
     foreach ($this->plugin['menu']['items'] as $key => $item) {
         // The item has already been set; continue to next item to avoid shifting
         // items onto the page arguments array more than once.
         if ($this->plugin['menu']['items'][$key]['access callback'] == 'panelizer_has_choice_callback') {
             continue;
         }
         $this->plugin['menu']['items'][$key]['access callback'] = 'panelizer_has_choice_callback';
         $this->plugin['menu']['items'][$key]['access arguments'] = array(3, 4, '');
         $this->plugin['menu']['items'][$key]['page callback'] = 'panelizer_export_ui_switcher_page';
         array_unshift($this->plugin['menu']['items'][$key]['page arguments'], 4);
         array_unshift($this->plugin['menu']['items'][$key]['page arguments'], 3);
     }
     parent::hook_menu($items);
 }
开发者ID:redponey,项目名称:openatrium-7.x-2.51,代码行数:33,代码来源:panelizer_defaults_ui.class.php

示例2: unset

 function hook_menu(&$items)
 {
     // Change the item to a tab.
     $this->plugin['menu']['items']['list']['type'] = MENU_LOCAL_TASK;
     $this->plugin['menu']['items']['list']['weight'] = -6;
     $this->plugin['menu']['items']['list']['title'] = 'List defaults';
     // menu local actions are weird.
     $this->plugin['menu']['items']['add']['path'] = 'list/add';
     $this->plugin['menu']['items']['import']['path'] = 'list/import';
     // Edit is being handled elsewhere:
     unset($this->plugin['menu']['items']['edit']);
     unset($this->plugin['menu']['items']['edit callback']);
     unset($this->plugin['menu']['items']['context']);
     unset($this->plugin['menu']['items']['content']);
     unset($this->plugin['menu']['items']['layout']);
     unset($this->plugin['menu']['items']['access']);
     // Change the callbacks for everything:
     foreach ($this->plugin['menu']['items'] as $key => $item) {
         $this->plugin['menu']['items'][$key]['access callback'] = 'panelizer_has_choice_callback';
         $this->plugin['menu']['items'][$key]['access arguments'] = array(4, 5, '');
         $this->plugin['menu']['items'][$key]['page callback'] = 'panelizer_export_ui_switcher_page';
         array_unshift($this->plugin['menu']['items'][$key]['page arguments'], 5);
         array_unshift($this->plugin['menu']['items'][$key]['page arguments'], 4);
     }
     parent::hook_menu($items);
 }
开发者ID:tierce,项目名称:ppbe,代码行数:26,代码来源:panelizer_defaults_ui.class.php

示例3: unset

 function hook_menu(&$items)
 {
     // During updates, this can run before our schema is set up, so our
     // plugin can be empty.
     if (empty($this->plugin['menu']['items']['add'])) {
         return;
     }
     // Change the item to a tab on the Panels page.
     $this->plugin['menu']['items']['list callback']['type'] = MENU_LOCAL_TASK;
     // Establish a base for adding plugins
     $base = $this->plugin['menu']['items']['add'];
     // Remove the default 'add' menu item.
     unset($this->plugin['menu']['items']['add']);
     ctools_include('plugins', 'panels');
     $this->builders = panels_get_layout_builders();
     asort($this->builders);
     foreach ($this->builders as $name => $builder) {
         // Create a new menu item for the builder
         $item = $base;
         $item['title'] = !empty($builder['builder tab title']) ? $builder['builder tab title'] : 'Add ' . $builder['title'];
         $item['page arguments'][] = $name;
         $item['path'] = 'add-' . $name;
         $this->plugin['menu']['items']['add ' . $name] = $item;
     }
     parent::hook_menu($items);
 }
开发者ID:odsherred,项目名称:subsites.odsherred.dk,代码行数:26,代码来源:panels_layouts_ui.class.php

示例4:

 function hook_menu(&$items)
 {
     // Change the item to a tab on the fb_social configuration page.
     $this->plugin['menu']['items']['list callback']['type'] = MENU_LOCAL_TASK;
     $this->plugin['menu']['items']['list callback']['weight'] = 10;
     parent::hook_menu($items);
 }
开发者ID:nimish321,项目名称:openscholar,代码行数:7,代码来源:fb_social_presets_ui.class.php

示例5: hook_menu

 /**
  * Ensure we cannot add, import, delete or clone.
  */
 public function hook_menu(&$items)
 {
     parent::hook_menu($items);
     unset($items['admin/config/system/cron/jobs/add']);
     // unset($items['admin/config/system/cron/jobs/import']);
     unset($items['admin/config/system/cron/jobs/list/%ctools_export_ui/delete']);
     unset($items['admin/config/system/cron/jobs/list/%ctools_export_ui/clone']);
 }
开发者ID:ehallarsis,项目名称:smvp,代码行数:11,代码来源:ultimate_cron_job_ctools_export_ui.class.php

示例6: unset

 function hook_menu(&$items)
 {
     // We are using our own 'edit' still, rather than having edit on this
     // object (maybe in the future) so unset the edit callbacks:
     // We leave these to make sure the operations still exist in the plugin so
     // that the path finder.
     unset($this->plugin['menu']['items']['edit']);
     unset($this->plugin['menu']['items']['add']);
     unset($this->plugin['menu']['items']['import']);
     unset($this->plugin['menu']['items']['edit callback']);
     parent::hook_menu($items);
 }
开发者ID:ksenzee,项目名称:views3ui,代码行数:12,代码来源:views_ui.class.php

示例7: foreach

 /**
  * hook_menu() entry point.
  */
 function hook_menu(&$items)
 {
     parent::hook_menu($items);
     $bundles = ms_products_get_bundles();
     foreach ($bundles as $bundle => $bundle_info) {
         $items['admin/structure/ms_products/' . $bundle . '/add'] = $items['admin/structure/ms_products/add'];
         $items['admin/structure/ms_products/' . $bundle . '/add']['access callback'] = 'user_access';
         $items['admin/structure/ms_products/' . $bundle . '/add']['access arguments'] = array('administer ' . $bundle . ' plans');
         $items['admin/structure/ms_products/' . $bundle . '/import'] = $items['admin/structure/ms_products/import'];
         $items['admin/structure/ms_products/' . $bundle . '/import']['access callback'] = 'user_access';
         $items['admin/structure/ms_products/' . $bundle . '/import']['access arguments'] = array('administer ' . $bundle . ' plans');
     }
     unset($items['admin/structure/ms_products/add']);
 }
开发者ID:KamesCG,项目名称:MoneySuite,代码行数:17,代码来源:ms_products_export_ui.class.php

示例8: unset

 function hook_menu(&$items)
 {
     // We are using our own 'edit' still, rather than having edit on this
     // object (maybe in the future) so unset the edit callbacks:
     // Store this so we can put them back as sometimes they're needed
     // again laster:
     $stored_items = $this->plugin['menu']['items'];
     // We leave these to make sure the operations still exist in the plugin so
     // that the path finder.
     unset($this->plugin['menu']['items']['edit']);
     unset($this->plugin['menu']['items']['add']);
     unset($this->plugin['menu']['items']['import']);
     unset($this->plugin['menu']['items']['edit callback']);
     parent::hook_menu($items);
     $this->plugin['menu']['items'] = $stored_items;
 }
开发者ID:e-gob,项目名称:GuiaDigital,代码行数:16,代码来源:views_ui.class.php

示例9: unset

 /**
  * Modify the default ctools export-ui hook_menu implementation.
  */
 function hook_menu(&$items)
 {
     parent::hook_menu($items);
     // Ensure the profiles tab is displayed correctly in the contexts of Ting
     // field search tabs.
     unset($items['admin/config/ting/ting-field-search/profiles/list']);
     $items['admin/config/ting/ting-field-search/profiles']['type'] = MENU_LOCAL_TASK;
     // Try to fix the display of the nested profile editing tabs.
     unset($items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui/edit']['page callback']);
     unset($items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui/edit']['page arguments']);
     unset($items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui/edit']['load arguments']);
     unset($items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui/edit']['access callback']);
     unset($items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui/edit']['access arguments']);
     $items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui']['type'] = MENU_NORMAL_ITEM;
     $items['admin/config/ting/ting-field-search/profiles/list/%ctools_export_ui']['title'] = 'Edit';
 }
开发者ID:vejlebib,项目名称:ting_field_search,代码行数:19,代码来源:ting_field_search_ctools_export_ui.class.php

示例10: strlen

 function hook_menu(&$items)
 {
     parent::hook_menu($items);
     // For added convienience, allow additional operation links to be available
     // as local tasks.
     $prefix = $this->plugin['menu']['menu prefix'] . '/' . $this->plugin['menu']['menu item'] . '/list/%ctools_export_ui/';
     $prefix_length = strlen($prefix);
     $ops = array('delete', 'revert', 'clone');
     foreach ($items as $path => &$item) {
         if (substr($path, 0, $prefix_length) === $prefix) {
             $str[$path] = $item;
             if (in_array(substr($path, $prefix_length), $ops)) {
                 $item['type'] = MENU_LOCAL_TASK;
             }
         }
     }
 }
开发者ID:anatolic,项目名称:vintage,代码行数:17,代码来源:panels_frame_ui.class.php

示例11:

 /**
  * Implementats CTools psuedo hook_menu_alter().
  *
  * @todo
  *   Can we do this in $plugin instead?
  */
 function hook_menu(&$items)
 {
     parent::hook_menu($items);
     $items['admin/structure/deploy/plans']['type'] = MENU_LOCAL_TASK;
     $items['admin/structure/deploy/plans']['weight'] = -10;
 }
开发者ID:kymunr,项目名称:DrupalProject,代码行数:12,代码来源:deploy_ui_plan.class.php

示例12:

 /**
  * hook_menu() entry point.
  *
  * Child implementations that need to add or modify menu items should
  * probably call parent::hook_menu($items) and then modify as needed.
  */
 function hook_menu(&$items)
 {
     parent::hook_menu($items);
     $items['admin/structure/openlayers/layers']['type'] = MENU_LOCAL_TASK;
 }
开发者ID:EarthTeam,项目名称:earthteam.net,代码行数:11,代码来源:openlayers_layers_ui.class.php

示例13:

 /**
  * hook_menu() entry point.
  *
  * Child implementations that need to add or modify menu items should
  * probably call parent::hook_menu($items) and then modify as needed.
  */
 function hook_menu(&$items)
 {
     parent::hook_menu($items);
     $items['admin/structure/openlayers/maps']['type'] = MENU_LOCAL_TASK;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/clone']['context'] = MENU_CONTEXT_INLINE;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/edit']['context'] = MENU_CONTEXT_INLINE;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/export']['context'] = MENU_CONTEXT_INLINE;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/revert']['context'] = MENU_CONTEXT_INLINE;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/clone']['type'] = MENU_LOCAL_TASK;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/edit']['type'] = MENU_LOCAL_TASK;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/export']['type'] = MENU_LOCAL_TASK;
     $items['admin/structure/openlayers/maps/list/%ctools_export_ui/revert']['type'] = MENU_LOCAL_TASK;
 }
开发者ID:EarthTeam,项目名称:earthteam.net,代码行数:19,代码来源:openlayers_maps_ui.class.php

示例14:

 /**
  * Override menu items.
  */
 function hook_menu(&$items)
 {
     $stored_items = $this->plugin['menu']['items'];
     parent::hook_menu($items);
     $this->plugin['menu']['items'] = $stored_items;
 }
开发者ID:samknelson,项目名称:grievance,代码行数:9,代码来源:custom_help_text_export_ui.class.php

示例15:

 function hook_menu(&$items)
 {
     if (empty($this->plugin['schema'])) {
         return;
     }
     parent::hook_menu($items);
     $prefix = ctools_export_ui_plugin_base_path($this->plugin);
 }
开发者ID:ehazell,项目名称:AWBA,代码行数:8,代码来源:delta_export_ui.class.php


注:本文中的ctools_export_ui::hook_menu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。