本文整理汇总了PHP中CommonGLPI::getState方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonGLPI::getState方法的具体用法?PHP CommonGLPI::getState怎么用?PHP CommonGLPI::getState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonGLPI
的用法示例。
在下文中一共展示了CommonGLPI::getState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTabNameForItem
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($item->getType() == 'PluginOrderOrder') {
if (Session::haveRight('plugin_order_order', PluginOrderOrder::canView()) && $item->getState() > PluginOrderOrderState::DRAFT) {
return self::createTabEntry(__("Item delivered", "order"), self::countForOrder($item));
}
}
}
示例2: getTabNameForItem
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
switch ($item->getType()) {
case 'Budget':
return __("Orders", "order");
case __CLASS__:
$ong = array();
$config = PluginOrderConfig::getConfig();
if (Session::haveRight("plugin_order_order", self::RIGHT_VALIDATION) || Session::haveRight("plugin_order_order", self::RIGHT_CANCEL) || Session::haveRight("plugin_order_order", self::RIGHT_UNDO_VALIDATION)) {
$ong[1] = __("Validation", "order");
}
if ($config->canGenerateOrderPDF() && ($item->getState() > PluginOrderOrderState::DRAFT || $this->canGenerateWithoutValidation())) {
// generation
$ong[2] = __("Purchase order", "order");
}
return $ong;
}
}
示例3: getTabNameForItem
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($item->getType() == 'Budget') {
return __("Orders", "order");
} else {
if ($item->getType() == __CLASS__) {
$ong = array();
$config = PluginOrderConfig::getConfig();
if (plugin_order_haveRight("validation", "w") || plugin_order_haveRight("cancel", "w") || plugin_order_haveRight("undo_validation", "w")) {
$ong[1] = __("Validation", "order");
}
if ($config->canGenerateOrderPDF() && $item->getState() > PluginOrderOrderState::DRAFT) {
// generation
$ong[2] = __("Order", "order");
}
return $ong;
}
}
}