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


PHP Printer::getTypeName方法代碼示例

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


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

示例1: getSearchOptions

 /**
  * Get search function for the class
  *
  * @since version 0.85
  *
  * @return array of search option
  **/
 function getSearchOptions()
 {
     $tab = parent::getSearchOptions();
     $tab[21]['table'] = $this->getTable();
     $tab[21]['field'] = 'is_visible_computer';
     $tab[21]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Computer::getTypeName(Session::getPluralNumber()));
     $tab[21]['datatype'] = 'bool';
     $tab[22]['table'] = $this->getTable();
     $tab[22]['field'] = 'is_visible_softwareversion';
     $tab[22]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), SoftwareVersion::getTypeName(Session::getPluralNumber()));
     $tab[22]['datatype'] = 'bool';
     $tab[23]['table'] = $this->getTable();
     $tab[23]['field'] = 'is_visible_monitor';
     $tab[23]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Monitor::getTypeName(Session::getPluralNumber()));
     $tab[23]['datatype'] = 'bool';
     $tab[24]['table'] = $this->getTable();
     $tab[24]['field'] = 'is_visible_printer';
     $tab[24]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Printer::getTypeName(Session::getPluralNumber()));
     $tab[24]['datatype'] = 'bool';
     $tab[25]['table'] = $this->getTable();
     $tab[25]['field'] = 'is_visible_peripheral';
     $tab[25]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Peripheral::getTypeName(Session::getPluralNumber()));
     $tab[25]['datatype'] = 'bool';
     $tab[26]['table'] = $this->getTable();
     $tab[26]['field'] = 'is_visible_phone';
     $tab[26]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Phone::getTypeName(Session::getPluralNumber()));
     $tab[26]['datatype'] = 'bool';
     $tab[27]['table'] = $this->getTable();
     $tab[27]['field'] = 'is_visible_networkequipment';
     $tab[27]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), NetworkEquipment::getTypeName(Session::getPluralNumber()));
     $tab[27]['datatype'] = 'bool';
     return $tab;
 }
開發者ID:kipman,項目名稱:glpi,代碼行數:40,代碼來源:state.class.php

示例2: Copyright

Copyright (C) 2003-2014 by the INDEPNET Development Team.

http://indepnet.net/   http://glpi-project.org
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("printer", "r");
Html::header(Printer::getTypeName(2), $_SERVER['PHP_SELF'], "inventory", "printer");
Search::show('Printer');
Html::footer();
開發者ID:geldarr,項目名稱:hack-space,代碼行數:31,代碼來源:printer.php

示例3: sprintf

            $print->restore($_POST);
            Event::log($_POST["id"], "printers", 4, "inventory", sprintf(__('%s restores an item'), $_SESSION["glpiname"]));
            $print->redirectToList();
        } else {
            if (isset($_POST["purge"])) {
                $print->check($_POST["id"], PURGE);
                $print->delete($_POST, 1);
                Event::log($_POST["id"], "printers", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
                $print->redirectToList();
            } else {
                if (isset($_POST["update"])) {
                    $print->check($_POST["id"], UPDATE);
                    $print->update($_POST);
                    Event::log($_POST["id"], "printers", 4, "inventory", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
                    Html::back();
                } else {
                    if (isset($_POST["unglobalize"])) {
                        $print->check($_POST["id"], UPDATE);
                        Computer_Item::unglobalizeItem($print);
                        Event::log($_POST["id"], "printers", 4, "inventory", sprintf(__('%s sets unitary management'), $_SESSION["glpiname"]));
                        Html::redirect($CFG_GLPI["root_doc"] . "/front/printer.form.php?id=" . $_POST["id"]);
                    } else {
                        Html::header(Printer::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "assets", "printer");
                        $print->display(array('id' => $_GET["id"], 'withtemplate' => $_GET["withtemplate"]));
                        Html::footer();
                    }
                }
            }
        }
    }
}
開發者ID:btry,項目名稱:glpi,代碼行數:31,代碼來源:printer.form.php

示例4: task_definitiontype_networkinventory

 static function task_definitiontype_networkinventory($a_itemtype)
 {
     $a_itemtype['PluginFusioninventoryIPRange'] = __('IP Ranges', 'fusioninventory');
     $a_itemtype['NetworkEquipment'] = NetworkEquipment::getTypeName();
     $a_itemtype['Printer'] = Printer::getTypeName();
     return $a_itemtype;
 }
開發者ID:korial29,項目名稱:fusioninventory-for-glpi,代碼行數:7,代碼來源:staticmisc.class.php


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