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


PHP Tracker::isActive方法代码示例

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


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

示例1: checkUserCanAccessTracker

 /**
  * Check that tracker can be accessed by user
  *
  * @param Tracker         $tracker
  * @param PFUser            $user
  * @param Codendi_Request $request
  *
  * @throws Tracker_CannotAccessTrackerException
  */
 public function checkUserCanAccessTracker($tracker, $user, Codendi_Request $request)
 {
     $this->checkServiceEnabled($tracker->getProject(), $request);
     if (!$tracker->isActive()) {
         throw new Tracker_CannotAccessTrackerException($GLOBALS['Language']->getText('plugin_tracker_common_type', 'tracker_not_exist'));
     }
     if (!$tracker->userCanView($user)) {
         throw new Tracker_CannotAccessTrackerException($GLOBALS['Language']->getText('plugin_tracker_common_type', 'no_view_permission'));
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:19,代码来源:TrackerManager.class.php

示例2: showEditForm

 public static function showEditForm(Tracker $tracker)
 {
     $tpl = array();
     $tpl['TRACKER_TYPE'] = $tracker->trackerType();
     $form = new PHPWS_Form('tracker');
     $form->addHidden('module', 'analytics');
     $form->addHidden('command', 'save_tracker');
     $form->addSubmit('submit', dgettext('analytics', 'Save Tracker'));
     if (isset($_REQUEST['tracker'])) {
         $form->addHidden('tracker', $_REQUEST['tracker']);
     }
     if ($tracker->getId() > 0) {
         $form->addHidden('tracker_id', $tracker->getId());
     }
     $form->addText('name', $tracker->getName());
     $form->setLabel('name', dgettext('analytics', 'Friendly Name'));
     $form->setRequired('name');
     $form->addCheck('active', 1);
     $form->setMatch('active', $tracker->isActive());
     $form->setLabel('active', dgettext('analytics', 'Currently Active'));
     $form->addCheck('disable_if_logged', 1);
     $form->setMatch('disable_if_logged', $tracker->getDisableIfLogged());
     $form->setLabel('disable_if_logged', dgettext('analytics', 'Disable Analytics if a user is logged in'));
     $tracker->addForm($form);
     $tpl = array_merge($tpl, $form->getTemplate());
     $tpl['TRACKER_FORM'] = PHPWS_Template::process($tpl, 'analytics', $tracker->getFormTemplate());
     return PHPWS_Template::process($tpl, 'analytics', 'edit.tpl');
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:28,代码来源:Analytics.php

示例3: _getDbTabs

 /**
  * Returns the db tabs as an array
  *
  * @return array Data for generating db tabs
  */
 private function _getDbTabs()
 {
     $db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($this->_db);
     $num_tables = count($GLOBALS['dbi']->getTables($this->_db));
     $is_superuser = $GLOBALS['dbi']->isSuperuser();
     $isCreateOrGrantUser = $GLOBALS['dbi']->isUserType('grant') || $GLOBALS['dbi']->isUserType('create');
     /**
      * Gets the relation settings
      */
     $cfgRelation = PMA_getRelationsParam();
     $tabs = array();
     $tabs['structure']['link'] = 'db_structure.php';
     $tabs['structure']['text'] = __('Structure');
     $tabs['structure']['icon'] = 'b_props.png';
     $tabs['sql']['link'] = 'db_sql.php';
     $tabs['sql']['text'] = __('SQL');
     $tabs['sql']['icon'] = 'b_sql.png';
     $tabs['search']['text'] = __('Search');
     $tabs['search']['icon'] = 'b_search.png';
     $tabs['search']['link'] = 'db_search.php';
     if ($num_tables == 0) {
         $tabs['search']['warning'] = __('Database seems to be empty!');
     }
     $tabs['qbe']['text'] = __('Query');
     $tabs['qbe']['icon'] = 's_db.png';
     $tabs['qbe']['link'] = 'db_qbe.php';
     if ($num_tables == 0) {
         $tabs['qbe']['warning'] = __('Database seems to be empty!');
     }
     $tabs['export']['text'] = __('Export');
     $tabs['export']['icon'] = 'b_export.png';
     $tabs['export']['link'] = 'db_export.php';
     if ($num_tables == 0) {
         $tabs['export']['warning'] = __('Database seems to be empty!');
     }
     if (!$db_is_system_schema) {
         $tabs['import']['link'] = 'db_import.php';
         $tabs['import']['text'] = __('Import');
         $tabs['import']['icon'] = 'b_import.png';
         $tabs['operation']['link'] = 'db_operations.php';
         $tabs['operation']['text'] = __('Operations');
         $tabs['operation']['icon'] = 'b_tblops.png';
         if ($is_superuser || $isCreateOrGrantUser) {
             $tabs['privileges']['link'] = 'server_privileges.php';
             $tabs['privileges']['args']['checkprivsdb'] = $this->_db;
             // stay on database view
             $tabs['privileges']['args']['viewing_mode'] = 'db';
             $tabs['privileges']['text'] = __('Privileges');
             $tabs['privileges']['icon'] = 's_rights.png';
         }
         $tabs['routines']['link'] = 'db_routines.php';
         $tabs['routines']['text'] = __('Routines');
         $tabs['routines']['icon'] = 'b_routines.png';
         if (Util::currentUserHasPrivilege('EVENT', $this->_db)) {
             $tabs['events']['link'] = 'db_events.php';
             $tabs['events']['text'] = __('Events');
             $tabs['events']['icon'] = 'b_events.png';
         }
         if (Util::currentUserHasPrivilege('TRIGGER', $this->_db)) {
             $tabs['triggers']['link'] = 'db_triggers.php';
             $tabs['triggers']['text'] = __('Triggers');
             $tabs['triggers']['icon'] = 'b_triggers.png';
         }
     }
     if (Tracker::isActive() && !$db_is_system_schema) {
         $tabs['tracking']['text'] = __('Tracking');
         $tabs['tracking']['icon'] = 'eye.png';
         $tabs['tracking']['link'] = 'db_tracking.php';
     }
     if (!$db_is_system_schema) {
         $tabs['designer']['text'] = __('Designer');
         $tabs['designer']['icon'] = 'b_relations.png';
         $tabs['designer']['link'] = 'db_designer.php';
         $tabs['designer']['id'] = 'designer_tab';
     }
     if (!$db_is_system_schema && $cfgRelation['centralcolumnswork']) {
         $tabs['central_columns']['text'] = __('Central columns');
         $tabs['central_columns']['icon'] = 'centralColumns.png';
         $tabs['central_columns']['link'] = 'db_central_columns.php';
     }
     return $tabs;
 }
开发者ID:alokrajiv,项目名称:phpmyadmin,代码行数:87,代码来源:Menu.php


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