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


PHP ctools_export_ui::build_operations方法代码示例

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


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

示例1: array

 /**
  * Add some additional operations for handling entities.
  */
 function build_operations($item)
 {
     $base_path = ctools_export_ui_plugin_base_path($this->plugin);
     $name = $item->{$this->plugin['export']['key']};
     $operations['list'] = array('title' => t('List'), 'href' => $base_path . '/' . $name . '/list');
     $operations['add_entity'] = array('title' => t('Add Entity'), 'href' => $base_path . '/' . $name . '/add');
     $operations += parent::build_operations($item);
     $operations['field'] = array('title' => t('Manage Fields'), 'href' => $base_path . '/' . $name . '/fields');
     $operations['display'] = array('title' => t('Manage Display'), 'href' => $base_path . '/' . $name . '/display');
     return $operations;
 }
开发者ID:michael-wojcik,项目名称:open_eggheads,代码行数:14,代码来源:fieldable_panels_pane.class.php

示例2: build_operations

 /**
  * Ensure that we cannot clone from the operations link list.
  */
 public function build_operations($item)
 {
     $item->lock_id = isset($item->lock_id) ? $item->lock_id : $item->isLocked();
     $allowed_operations = parent::build_operations($item);
     unset($allowed_operations['clone']);
     if ($item->lock_id) {
         unset($allowed_operations['run']);
         $allowed_operations['unlock']['href'] .= '/' . $item->lock_id;
     } else {
         unset($allowed_operations['unlock']);
     }
     if (!empty($item->hook['configure'])) {
         $allowed_operations['configure'] = array('title' => t('Configure'), 'href' => $item->hook['configure']);
     }
     if (!empty($item->hook['immutable'])) {
         unset($allowed_operations['edit']);
         unset($allowed_operations['disable']);
         unset($allowed_operations['enable']);
         unset($allowed_operations['export']);
     }
     if (variable_get('maintenance_mode', 0)) {
         unset($allowed_operations['run']);
     }
     $item->build_operations_alter($allowed_operations);
     $default_sort = array('logs' => -10, 'edit' => -2, 'enable' => -1, 'disable' => -1, 'run' => 0, 'unlock' => 0, 'export' => 1, 'configure' => 1);
     $weight = 0;
     $this->notoken = TRUE;
     foreach ($allowed_operations as $name => &$operation) {
         if (!$this->access($name, $item)) {
             unset($allowed_operations[$name]);
             continue;
         }
         $operation += array('sort' => array(isset($default_sort[$name]) ? $default_sort[$name] : 0), 'alias' => TRUE);
         $operation['sort'][] = $weight++;
     }
     unset($this->notoken);
     uasort($allowed_operations, '_ultimate_cron_multi_column_sort');
     return $allowed_operations;
 }
开发者ID:ehallarsis,项目名称:smvp,代码行数:42,代码来源:ultimate_cron_job_ctools_export_ui.class.php


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