getTabNameForItem() public method

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI
コード例 #1
0
 /**
  * @since version 0.84
  *
  * @param $item         CommonGLPI object
  * @param $withtemplate (default 0)
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (Session::haveRight(self::$rightname, READ)) {
         switch ($item->getType()) {
             case 'TicketTemplate':
                 $ong[1] = $this->getTypeName(Session::getPluralNumber());
                 return $ong;
         }
     }
     return parent::getTabNameForItem($item, $withtemplate);
 }
コード例 #2
0
 /**
  * @since version 0.84
  *
  * @param $item         CommonGLPI object
  * @param $withtemplate (default 0)
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (Session::haveRight("entity_dropdown", "r")) {
         switch ($item->getType()) {
             case 'TicketTemplate':
                 $ong[1] = $this->getTypeName(2);
                 return $ong;
         }
     }
     return parent::getTabNameForItem($item, $withtemplate);
 }