當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonDBTM::getRights方法代碼示例

本文整理匯總了PHP中CommonDBTM::getRights方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonDBTM::getRights方法的具體用法?PHP CommonDBTM::getRights怎麽用?PHP CommonDBTM::getRights使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonDBTM的用法示例。


在下文中一共展示了CommonDBTM::getRights方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     $values[self::HOMEPAGE] = __('See in homepage', 'monitoring');
     $values[self::DASHBOARD] = __('See in dashboard', 'monitoring');
     return $values;
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:12,代碼來源:perfdata.class.php

示例2: getRights

   /**
    * @since version 0.85
    *
    * @see commonDBTM::getRights()
    **/
   function getRights($interface='central') {

      $values = parent::getRights();
      unset($values[CREATE]);

      return $values;
   }
開發者ID:euqip,項目名稱:glpi-smartcities,代碼行數:12,代碼來源:tag.class.php

示例3: getRights

 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     if ($interface == 'helpdesk') {
         unset($values[CREATE], $values[DELETE], $values[PURGE]);
     }
     return $values;
 }
開發者ID:OscarLoayzaB,項目名稱:relation,代碼行數:8,代碼來源:typerelation.class.php

示例4: showFormSetup

 /**
  * Print the central form for a profile
  *
  * @param $openform     boolean  open the form (true by default)
  * @param $closeform    boolean  close the form (true by default)
  **/
 function showFormSetup($openform = true, $closeform = true)
 {
     if (!self::canView()) {
         return false;
     }
     echo "<div class='spaced'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         echo "<form method='post' action='" . $this->getFormURL() . "'>";
     }
     $dropdown_rights = CommonDBTM::getRights();
     unset($dropdown_rights[DELETE]);
     unset($dropdown_rights[UNLOCK]);
     $rights = array(array('itemtype' => 'Config', 'label' => __('General setup'), 'field' => 'config'), array('itemtype' => 'DisplayPreference', 'label' => __('Search result display'), 'field' => 'search_config'), array('itemtype' => 'Item_Devices', 'label' => _n('Component', 'Components', Session::getPluralNumber()), 'field' => 'device'), array('rights' => $dropdown_rights, 'label' => _n('Global dropdown', 'Global dropdowns', Session::getPluralNumber()), 'field' => 'dropdown'), __('Entity dropdowns'), array('itemtype' => 'Domain', 'label' => _n('Domain', 'Domains', Session::getPluralNumber()), 'field' => 'domain'), array('itemtype' => 'Location', 'label' => _n('Location', 'Locations', Session::getPluralNumber()), 'field' => 'location'), array('itemtype' => 'ITILCategory', 'label' => _n('Ticket category', 'Ticket categories', Session::getPluralNumber()), 'field' => 'itilcategory'), array('itemtype' => 'KnowbaseItemCategory', 'label' => _n('Knowledge base category', 'Knowledge base categories', Session::getPluralNumber()), 'field' => 'knowbasecategory'), array('itemtype' => 'Netpoint', 'label' => _n('Network outlet', 'Network outlets', Session::getPluralNumber()), 'field' => 'netpoint'), array('itemtype' => 'TaskCategory', 'label' => _n('Task category', 'Task categories', Session::getPluralNumber()), 'field' => 'taskcategory'), array('itemtype' => 'State', 'label' => _n('Status of items', 'Statuses of items', Session::getPluralNumber()), 'field' => 'state'), array('itemtype' => 'SolutionTemplate', 'label' => _n('Solution template', 'Solution templates', Session::getPluralNumber()), 'field' => 'solutiontemplate'), array('itemtype' => 'Calendar', 'label' => _n('Calendar', 'Calendars', Session::getPluralNumber()), 'field' => 'calendar'), array('itemtype' => 'DocumentType', 'label' => __('Document type'), 'field' => 'typedoc'), array('itemtype' => 'Link', 'label' => _n('External link', 'External links', Session::getPluralNumber()), 'field' => 'link'), array('itemtype' => 'Notification', 'label' => _n('Notification', 'Notifications', Session::getPluralNumber()), 'field' => 'notification'), array('itemtype' => 'SLA', 'label' => __('SLA'), 'field' => 'sla'));
     $this->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('Setup')));
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo "<input type='hidden' name='id' value='" . $this->fields['id'] . "'>";
         echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
     $this->showLegend();
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:30,代碼來源:profile.class.php

示例5: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     unset($values[UPDATE], $values[CREATE], $values[READ]);
     if ($interface == 'central') {
         $values[self::UPDATEALL] = __('Update all');
         $values[self::ADDALLTICKET] = __('Add to all tickets');
         $values[self::SEEPRIVATE] = __('See private ones');
     }
     $values[self::ADDGROUPTICKET] = array('short' => __('Add followup (associated groups)'), 'long' => __('Add a followup to tickets of associated groups'));
     $values[self::UPDATEMY] = __('Update followups (author)');
     $values[self::ADDMYTICKET] = array('short' => __('Add followup (requester)'), 'long' => __('Add a followup to tickets (requester)'));
     $values[self::SEEPUBLIC] = __('See public ones');
     if ($interface == 'helpdesk') {
         unset($values[PURGE]);
     }
     return $values;
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:23,代碼來源:ticketfollowup.class.php

示例6: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     //TRANS: short for : Add users from an external source
     $values[self::IMPORTEXTAUTHUSERS] = array('short' => __('Add external'), 'long' => __('Add users from an external source'));
     //TRANS: short for : Read method for user authentication and synchronization
     $values[self::READAUTHENT] = array('short' => __('Read auth'), 'long' => __('Read user authentication and synchronization method'));
     //TRANS: short for : Update method for user authentication and synchronization
     $values[self::UPDATEAUTHENT] = array('short' => __('Update auth and sync'), 'long' => __('Update method for user authentication and synchronization'));
     return $values;
 }
開發者ID:pvasener,項目名稱:glpi,代碼行數:16,代碼來源:user.class.php

示例7: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     if ($interface == 'helpdesk') {
         $values = array(READ => __('Read'));
     } else {
         $values = parent::getRights();
     }
     return $values;
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:14,代碼來源:rssfeed.class.php

示例8: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     if ($interface == 'central') {
         $values = parent::getRights();
         $values[self::RIGHT_GENERATEODT] = __("Order Generation", "order");
         $values[self::RIGHT_DELIVERY] = __("Take item delivery", "order");
         $values[self::RIGHT_VALIDATION] = __("Order validation", "order");
         $values[self::RIGHT_CANCEL] = __("Cancel order", "order");
         $values[self::RIGHT_UNDO_VALIDATION] = __("Edit a validated order", "order");
         $values[self::RIGHT_GENERATEODT_WITHOUT_VALIDATION] = __("Generate order without validation", "order");
     }
     $values[self::RIGHT_OPENTICKET] = __("Link order to a ticket", "order");
     return $values;
 }
開發者ID:pluginsGLPI,項目名稱:order,代碼行數:19,代碼來源:order.class.php

示例9: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     if ($interface == 'central') {
         $values = parent::getRights();
         $values[self::KNOWBASEADMIN] = __('Knowledge base administration');
         $values[self::PUBLISHFAQ] = __('Publish in the FAQ');
     }
     $values[self::READFAQ] = __('Read the FAQ');
     return $values;
 }
開發者ID:jose-martins,項目名稱:glpi,代碼行數:15,代碼來源:knowbaseitem.class.php

示例10: getRights

 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     return $values;
 }
開發者ID:btry,項目名稱:genericobject,代碼行數:5,代碼來源:type.class.php

示例11: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     unset($values[READ]);
     $values[self::READALL] = __('See all');
     $values[self::READMY] = __('See (actor)');
     return $values;
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:13,代碼來源:project.class.php

示例12: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $rights = parent::getRights();
     $rights[PluginSimcardProfile::SIMCARD_ASSOCIATE_TICKET] = __('Associable to a ticket');
     return $rights;
 }
開發者ID:NandyJoshu,項目名稱:simcard,代碼行數:11,代碼來源:simcard.class.php

示例13: getRights

 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $rights = parent::getRights();
     $rights[self::RIGHT_SIMCARD_OPEN_TICKET] = __('Associable to a ticket');
     return $rights;
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:11,代碼來源:simcard.class.php

示例14: getRights

 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     unset($values[READNOTE], $values[UPDATENOTE], $values[DELETE]);
     return $values;
 }
開發者ID:sx3052,項目名稱:racks,代碼行數:6,代碼來源:itemspecification.class.php


注:本文中的CommonDBTM::getRights方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。