本文整理汇总了PHP中Plugin::isActivated方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::isActivated方法的具体用法?PHP Plugin::isActivated怎么用?PHP Plugin::isActivated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::isActivated方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showAllItems
static function showAllItems($myname, $value_type = 0, $value = 0, $entity_restrict = -1, $types, $locations_id = -1, $action = 'showItem')
{
global $DB, $CFG_GLPI;
$rand = mt_rand();
$plugin = new Plugin();
echo "<table border='0'><tr><td>\n";
if ($myname == 'type') {
$newtypes = array_flip($types);
unset($newtypes['Location']);
unset($newtypes['Netpoint']);
if ($plugin->isActivated("resources")) {
unset($newtypes['PluginResourcesResource']);
}
$types = array_flip($newtypes);
}
$rand = Dropdown::showItemTypes($myname, $types, array('emptylabel' => Dropdown::EMPTY_VALUE, 'width' => 150));
$params = array('type' => '__VALUE__', 'value' => $value, 'myname' => $myname, 'action' => $action, 'entity_restrict' => $entity_restrict, 'locations_id' => $locations_id);
Ajax::updateItemOnSelectEvent("dropdown_{$myname}{$rand}", "show_{$myname}{$rand}", $CFG_GLPI["root_doc"] . "/plugins/positions/ajax/dropdownAllItems.php", $params);
echo "</td><td>\n";
echo "<span id='show_{$myname}{$rand}'> </span>\n";
echo "</td></tr></table>\n";
if ($value > 0) {
echo "<script type='text/javascript' >\n";
echo "document.getElementById('item_type{$rand}').value='" . $value_type . "';";
echo "</script>\n";
$params["typetable"] = $value_type;
Ajax::updateItem("show_{$myname}{$rand}", $CFG_GLPI["root_doc"] . "/plugins/positions/ajax/dropdownAllItems.php", $params);
}
return $rand;
}
示例2: plugin_init_formcreator
/**
* Initialize all classes and generic variables of the plugin
*/
function plugin_init_formcreator()
{
global $PLUGIN_HOOKS;
// Add specific CSS
$PLUGIN_HOOKS['add_css']['formcreator'][] = "css/styles.css";
if (strpos($_SERVER['REQUEST_URI'], "front/helpdesk.public.php") !== false) {
$PLUGIN_HOOKS['add_javascript']['formcreator'][] = 'scripts/helpdesk.js';
} elseif (strpos($_SERVER['REQUEST_URI'], "front/central.php") !== false) {
$PLUGIN_HOOKS['add_javascript']['formcreator'][] = 'scripts/homepage.js';
}
if (isset($_SESSION['glpiactiveprofile'])) {
if ($_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') {
$PLUGIN_HOOKS['add_javascript']['formcreator'][] = 'scripts/helpdesk-menu.js';
}
}
$PLUGIN_HOOKS['add_javascript']['formcreator'][] = 'scripts/forms-validation.js.php';
// Set the plugin CSRF compliance (required in GLPI 0.84)
$PLUGIN_HOOKS['csrf_compliant']['formcreator'] = true;
// Add a link in the main menu plugins for technician and admin panel
$PLUGIN_HOOKS['menu_entry']['formcreator'] = 'front/formlist.php';
// Config page
$plugin = new Plugin();
$links = array();
if (Session::haveRight('config', 'w') && $plugin->isActivated("formcreator")) {
$PLUGIN_HOOKS['config_page']['formcreator'] = 'front/form.php';
$links['config'] = '/plugins/formcreator/front/form.php';
$links['add'] = '/plugins/formcreator/front/form.form.php';
}
// Set options for pages (title, links, buttons...)
$links['search'] = '/plugins/formcreator/front/formlist.php';
$PLUGIN_HOOKS['submenu_entry']['formcreator']['options'] = array('config' => array('title' => __('Setup'), 'page' => '/plugins/formcreator/front/form.php', 'links' => $links), 'options' => array('title' => _n('Form', 'Forms', 2, 'formcreator'), 'links' => $links));
// Load field class and all its method to manage fields
Plugin::registerClass('PluginFormcreatorFields');
}
示例3: plugin_init_customfields
/**
* Initialize the plugin's hooks
*/
function plugin_init_customfields()
{
global $PLUGIN_HOOKS, $DB, $ACTIVE_CUSTOMFIELDS_TYPES, $ALL_CUSTOMFIELDS_TYPES;
$PLUGIN_HOOKS['csrf_compliant']['customfields'] = true;
$PLUGIN_HOOKS['change_profile']['customfields'] = array('PluginCustomfieldsProfile', 'changeprofile');
// Register classes
Plugin::registerClass('PluginCustomfieldsDropdowns');
Plugin::registerClass('PluginCustomfieldsFields');
if (isset($_SESSION['glpiID'])) {
$plugin = new Plugin();
if ($plugin->isInstalled("customfields") && $plugin->isActivated("customfields")) {
// enable a tab for reading / setting access rights for the plugin
Plugin::registerClass('PluginCustomfieldsProfile', array('addtabon' => 'Profile'));
// Display a menu entry in the main menu if the user has
// configuration rights
if (Session::haveRight('config', UPDATE)) {
// $PLUGIN_HOOKS['menu_entry']['customfields'] = true;
$PLUGIN_HOOKS["menu_toadd"]['customfields'] = array('plugins' => 'PluginCustomfieldsConfig');
}
// initiate empty dropdowns
$PLUGIN_HOOKS['item_empty']['customfields'] = array('PluginCustomfieldsDropdownsItem' => 'PluginCustomfieldsDropdownsItem::item_empty');
}
// Indicate where the configuration page can be found
if (Session::haveRight('config', UPDATE)) {
$PLUGIN_HOOKS['config_page']['customfields'] = 'front/config.form.php';
}
// Hook for initialization after initialization of all other plugins
$PLUGIN_HOOKS['post_init']['customfields'] = 'plugin_customfields_postinit';
}
}
示例4: plugin_init_certificates
function plugin_init_certificates()
{
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['certificates'] = true;
$PLUGIN_HOOKS['change_profile']['certificates'] = array('PluginCertificatesProfile', 'initProfile');
$PLUGIN_HOOKS['assign_to_ticket']['certificates'] = true;
if (Session::getLoginUserID()) {
// Params : plugin name - string type - number - attributes
Plugin::registerClass('PluginCertificatesCertificate', array('linkgroup_tech_types' => true, 'linkuser_tech_types' => true, 'document_types' => true, 'helpdesk_visible_types' => true, 'ticket_types' => true, 'contract_types' => true, 'notificationtemplates_types' => true));
Plugin::registerClass('PluginCertificatesConfig', array('addtabon' => 'CronTask'));
Plugin::registerClass('PluginCertificatesProfile', array('addtabon' => 'Profile'));
if (class_exists('PluginAccountsAccount')) {
PluginAccountsAccount::registerType('PluginCertificatesCertificate');
}
$plugin = new Plugin();
if (!$plugin->isActivated('environment') && Session::haveRight("plugin_certificates", READ)) {
$PLUGIN_HOOKS['menu_toadd']['certificates'] = array('assets' => 'PluginCertificatesMenu');
}
if (Session::haveRight("plugin_certificates", UPDATE)) {
$PLUGIN_HOOKS['use_massive_action']['certificates'] = 1;
}
// End init, when all types are registered
$PLUGIN_HOOKS['post_init']['certificates'] = 'plugin_certificates_postinit';
}
}
示例5: plugin_init_uninstall
/**
* Function Init
*/
function plugin_init_uninstall()
{
global $PLUGIN_HOOKS, $CFG_GLPI, $UNINSTALL_TYPES, $UNINSTALL_DIRECT_CONNECTIONS_TYPE;
$PLUGIN_HOOKS['csrf_compliant']['uninstall'] = true;
Plugin::registerClass('PluginUninstallPreference', array('addtabon' => array('Preference')));
Plugin::registerClass('PluginUninstallProfile', array('addtabon' => array('Profile')));
$plugin = new Plugin();
if ($plugin->isActivated('uninstall')) {
$UNINSTALL_TYPES = array('Computer', 'Monitor', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer');
$UNINSTALL_DIRECT_CONNECTIONS_TYPE = array('Monitor', 'Peripheral', 'Phone', 'Printer');
if (Session::getLoginUserID()) {
if (Session::haveRight(PluginUninstallProfile::$rightname, READ)) {
$PLUGIN_HOOKS['use_massive_action']['uninstall'] = true;
if (Session::haveRight('uninstall:profile', READ)) {
// Add link in GLPI plugins list :
$PLUGIN_HOOKS["menu_toadd"]['uninstall'] = array('admin' => 'PluginUninstallModel');
// add to 'Admin' menu :
$PLUGIN_HOOKS['config_page']['uninstall'] = "front/model.php";
}
//Item actions
$PLUGIN_HOOKS['item_update']['uninstall'] = array('PluginUninstallModel' => array('PluginUninstallPreference', 'afterUpdateModel'));
$PLUGIN_HOOKS['item_delete']['uninstall'] = array('PluginUninstallModel' => array('PluginUninstallPreference', 'beforeItemPurge'));
$PLUGIN_HOOKS['pre_item_purge']['uninstall'] = array('User' => array('PluginUninstallPreference', 'beforeItemPurge'));
}
}
$PLUGIN_HOOKS['post_init']['uninstall'] = 'plugin_uninstall_postinit';
}
}
示例6: showSummary
static function showSummary()
{
echo "<div class='center'><table class='tab_cadre' cellpadding='5' width='50%'>";
echo "<tr><th>" . __('Summary') . "</th></tr>";
if (countElementsInTable('glpi_plugin_archires_views', "`entities_id`='" . $_SESSION["glpiactive_entity"] . "'") > 0) {
echo "<tr class='tab_bg_1'><td>";
echo "<a href='view.php'>" . PluginArchiresView::getTypeName(2) . "</a>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'><td>";
echo "<a href='locationquery.php'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), PluginArchiresLocationQuery::getTypeName(1)) . "</a>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'><td>";
echo "<a href='networkequipmentquery.php'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), PluginArchiresNetworkEquipmentQuery::getTypeName(1)) . "</a>";
echo "</td></tr>";
$plugin = new Plugin();
if ($plugin->isActivated("appliances")) {
echo "<tr class='tab_bg_1'><td>";
echo "<a href='appliancequery.php'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), PluginAppliancesAppliance::getTypeName(1)) . "</a>";
echo "</td></tr>";
}
} else {
echo "<tr class='tab_bg_1'><td>";
echo "<a href='view.form.php?new=1'>" . __('Add view', 'archires') . "</a>";
echo "</td></tr>";
}
echo "</table></div>";
}
示例7: plugin_fields_checkFiles
function plugin_fields_checkFiles()
{
$plugin = new Plugin();
if (isset($_SESSION['glpiactiveentities']) && $plugin->isInstalled('fields') && $plugin->isActivated('fields')) {
Plugin::registerClass('PluginFieldsContainer');
Plugin::registerClass('PluginFieldsDropdown');
Plugin::registerClass('PluginFieldsField');
if (TableExists("glpi_plugin_fields_containers")) {
$container_obj = new PluginFieldsContainer();
$containers = $container_obj->find();
foreach ($containers as $container) {
$classname = "PluginFields" . ucfirst($container['itemtype'] . preg_replace('/s$/', '', $container['name']));
if (!class_exists($classname)) {
PluginFieldsContainer::generateTemplate($container);
}
}
}
if (TableExists("glpi_plugin_fields_fields")) {
$fields_obj = new PluginFieldsField();
$fields = $fields_obj->find("`type` = 'dropdown'");
foreach ($fields as $field) {
PluginFieldsDropdown::create($field);
}
}
}
}
示例8: plugin_init_databases
function plugin_init_databases()
{
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['databases'] = true;
$PLUGIN_HOOKS['change_profile']['databases'] = array('PluginDatabasesProfile', 'initProfile');
$PLUGIN_HOOKS['assign_to_ticket']['databases'] = true;
//$PLUGIN_HOOKS['assign_to_ticket_dropdown']['databases'] = true;
//$PLUGIN_HOOKS['assign_to_ticket_itemtype']['databases'] = array('PluginDatabasesDatabase_Item');
Plugin::registerClass('PluginDatabasesDatabase', array('linkgroup_tech_types' => true, 'linkuser_tech_types' => true, 'document_types' => true, 'ticket_types' => true, 'helpdesk_visible_types' => true, 'addtabon' => 'Supplier'));
Plugin::registerClass('PluginDatabasesProfile', array('addtabon' => 'Profile'));
//Plugin::registerClass('PluginDatabasesDatabase_Item',
// array('ticket_types' => true));
if (class_exists('PluginAccountsAccount')) {
PluginAccountsAccount::registerType('PluginDatabasesDatabase');
}
if (Session::getLoginUserID()) {
$plugin = new Plugin();
if (!$plugin->isActivated('environment') && Session::haveRight("plugin_databases", READ)) {
$PLUGIN_HOOKS['menu_toadd']['databases'] = array('assets' => 'PluginDatabasesMenu');
}
if (Session::haveRight("plugin_databases", UPDATE)) {
$PLUGIN_HOOKS['use_massive_action']['databases'] = 1;
}
if (class_exists('PluginDatabasesDatabase_Item')) {
// only if plugin activated
$PLUGIN_HOOKS['plugin_datainjection_populate']['databases'] = 'plugin_datainjection_populate_databases';
}
// End init, when all types are registered
$PLUGIN_HOOKS['post_init']['databases'] = 'plugin_databases_postinit';
// Import from Data_Injection plugin
$PLUGIN_HOOKS['migratetypes']['databases'] = 'plugin_datainjection_migratetypes_databases';
}
}
示例9: plugin_init_datainjection
function plugin_init_datainjection()
{
global $PLUGIN_HOOKS, $CFG_GLPI, $INJECTABLE_TYPES;
$PLUGIN_HOOKS['csrf_compliant']['datainjection'] = true;
$PLUGIN_HOOKS['migratetypes']['datainjection'] = 'plugin_datainjection_migratetypes_datainjection';
$plugin = new Plugin();
if ($plugin->isActivated("datainjection")) {
Plugin::registerClass('PluginDatainjectionProfile', array('addtabon' => array('Profile')));
//If directory doesn't exists, create it
if (!plugin_datainjection_checkDirectories()) {
@mkdir(PLUGIN_DATAINJECTION_UPLOAD_DIR) or die(sprintf(__('%1$s %2$s'), __("Can't create folder", 'datainjection'), PLUGIN_DATAINJECTION_UPLOAD_DIR));
}
if (Session::haveRight('plugin_datainjection_model', READ)) {
$PLUGIN_HOOKS["menu_toadd"]['datainjection'] = array('tools' => 'PluginDatainjectionMenu');
}
$PLUGIN_HOOKS['pre_item_purge']['datainjection'] = array('Profile' => array('PluginDatainjectionProfile', 'purgeProfiles'));
// Css file
$PLUGIN_HOOKS['add_css']['datainjection'] = 'css/datainjection.css';
// Javascript file
$PLUGIN_HOOKS['add_javascript']['datainjection'] = 'javascript/datainjection.js';
// Inbtegration with Webservices plugin
$PLUGIN_HOOKS['webservices']['datainjection'] = 'plugin_datainjection_registerMethods';
$INJECTABLE_TYPES = array();
}
}
示例10: plugin_init_badges
function plugin_init_badges()
{
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['badges'] = true;
$PLUGIN_HOOKS['assign_to_ticket']['badges'] = true;
$PLUGIN_HOOKS['change_profile']['badges'] = array('PluginBadgesProfile', 'initProfile');
if (Session::getLoginUserID()) {
Plugin::registerClass('PluginBadgesBadge', array('linkuser_types' => true, 'document_types' => true, 'helpdesk_visible_types' => true, 'ticket_types' => true, 'notificationtemplates_types' => true));
Plugin::registerClass('PluginBadgesProfile', array('addtabon' => 'Profile'));
Plugin::registerClass('PluginBadgesConfig', array('addtabon' => 'CronTask'));
if (class_exists('PluginResourcesResource')) {
PluginResourcesResource::registerType('PluginBadgesBadge');
}
$plugin = new Plugin();
if (!$plugin->isActivated('environment') && Session::haveRight("plugin_badges", READ)) {
$PLUGIN_HOOKS['menu_toadd']['badges'] = array('assets' => 'PluginBadgesMenu');
}
if (Session::haveRight("plugin_badges", UPDATE)) {
$PLUGIN_HOOKS['use_massive_action']['badges'] = 1;
}
if (class_exists('PluginBadgesBadge')) {
// only if plugin activated
$PLUGIN_HOOKS['plugin_datainjection_populate']['badges'] = 'plugin_datainjection_populate_badges';
}
// Import from Data_Injection plugin
$PLUGIN_HOOKS['migratetypes']['badges'] = 'plugin_datainjection_migratetypes_badges';
}
}
示例11: plugin_init_pdf
function plugin_init_pdf()
{
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['pdf'] = true;
Plugin::registerClass('PluginPdfProfile', array('addtabon' => 'Profile'));
Plugin::registerClass('PluginPdfPreference', array('addtabon' => 'Preference'));
$PLUGIN_HOOKS['change_profile']['pdf'] = array('PluginPdfProfile', 'changeprofile');
$PLUGIN_HOOKS['pre_item_purge']['pdf'] = array('Profile' => array('PluginPdfProfile', 'cleanProfile'));
$PLUGIN_HOOKS['item_clone']['pdf'] = array('Profile' => array('PluginPdfProfile', 'cloneProfile'));
$plugin = new Plugin();
if ($plugin->isActivated("datainjection")) {
$PLUGIN_HOOKS['menu_entry']['pdf'] = 'front/preference.form.php';
}
if (isset($_SESSION["glpi_plugin_pdf_profile"]) && $_SESSION["glpi_plugin_pdf_profile"]["use"]) {
$PLUGIN_HOOKS['use_massive_action']['pdf'] = 1;
// Define the type for which we know how to generate PDF :
$PLUGIN_HOOKS['plugin_pdf']['Computer'] = 'PluginPdfComputer';
$PLUGIN_HOOKS['plugin_pdf']['Group'] = 'PluginPdfGroup';
$PLUGIN_HOOKS['plugin_pdf']['KnowbaseItem'] = 'PluginPdfKnowbaseItem';
$PLUGIN_HOOKS['plugin_pdf']['Monitor'] = 'PluginPdfMonitor';
$PLUGIN_HOOKS['plugin_pdf']['NetworkEquipment'] = 'PluginPdfNetworkEquipment';
$PLUGIN_HOOKS['plugin_pdf']['Peripheral'] = 'PluginPdfPeripheral';
$PLUGIN_HOOKS['plugin_pdf']['Phone'] = 'PluginPdfPhone';
$PLUGIN_HOOKS['plugin_pdf']['Printer'] = 'PluginPdfPrinter';
$PLUGIN_HOOKS['plugin_pdf']['Software'] = 'PluginPdfSoftware';
$PLUGIN_HOOKS['plugin_pdf']['SoftwareLicense'] = 'PluginPdfSoftwareLicense';
$PLUGIN_HOOKS['plugin_pdf']['SoftwareVersion'] = 'PluginPdfSoftwareVersion';
$PLUGIN_HOOKS['plugin_pdf']['Ticket'] = 'PluginPdfTicket';
// End init, when all types are registered by all plugins
$PLUGIN_HOOKS['post_init']['pdf'] = 'plugin_pdf_postinit';
}
}
示例12: plugin_init_surveyticket
function plugin_init_surveyticket()
{
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['surveyticket'] = true;
if (isset($_SESSION["glpiID"])) {
$plugin = new Plugin();
if ($plugin->isActivated('surveyticket')) {
Plugin::registerClass('PluginSurveyticketProfile', array('addtabon' => array('Profile')));
$PLUGIN_HOOKS['change_profile']['surveyticket'] = array('PluginSurveyticketProfile', 'changeprofile');
PluginSurveyticketProfile::changeprofile();
if (PluginSurveyticketProfile::haveRight("config", 'r')) {
$PLUGIN_HOOKS['menu_entry']['surveyticket'] = true;
$PLUGIN_HOOKS['config_page']['surveyticket'] = 'front/menu.php';
}
$PLUGIN_HOOKS['post_init']['surveyticket'] = 'plugin_surveyticket_post_init';
}
// Icons add, search...
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['add']['questions'] = 'front/question.form.php?add=1';
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['search']['questions'] = 'front/question.php';
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['add']['survey'] = 'front/survey.form.php?add=1';
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['search']['survey'] = 'front/survey.php';
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['add']['answers'] = 'front/answer.form.php?add=1';
// Fil ariane
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['options']['questions']['title'] = "Questions";
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['options']['questions']['page'] = '/plugins/surveyticket/front/question.php';
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['options']['answers']['title'] = "Answers";
// $PLUGIN_HOOKS['submenu_entry']['surveyticket']['options']['answers']['page'] = '/plugins/surveyticket/front/answer.php';
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['options']['survey']['title'] = "Surveys";
$PLUGIN_HOOKS['submenu_entry']['surveyticket']['options']['survey']['page'] = '/plugins/surveyticket/front/survey.php';
}
}
示例13: plugin_init_escalade
function plugin_init_escalade()
{
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['escalade'] = true;
$plugin = new Plugin();
if (isset($_SESSION['glpiID']) && $plugin->isInstalled('escalade') && $plugin->isActivated('escalade')) {
//load config in session
if (TableExists("glpi_plugin_escalade_configs")) {
PluginEscaladeConfig::loadInSession();
// == Load js scripts ==
if (isset($_SESSION['plugins']['escalade']['config'])) {
$escalade_config = $_SESSION['plugins']['escalade']['config'];
$PLUGIN_HOOKS['add_javascript']['escalade'][] = 'scripts/function.js';
// on central page
if (strpos($_SERVER['REQUEST_URI'], "central.php") !== false) {
//history and climb feature
if ($escalade_config['show_history']) {
$PLUGIN_HOOKS['add_javascript']['escalade'][] = 'scripts/central.js.php';
}
}
// on ticket page (in edition)
if (strpos($_SERVER['REQUEST_URI'], "ticket.form.php") !== false && isset($_GET['id'])) {
//history and climb feature
if ($escalade_config['show_history']) {
$PLUGIN_HOOKS['add_javascript']['escalade'][] = 'scripts/escalade.js.php';
}
//remove btn feature
if (!$escalade_config['remove_delete_group_btn'] || !$escalade_config['remove_delete_user_btn']) {
$PLUGIN_HOOKS['add_javascript']['escalade'][] = 'scripts/remove_btn.js.php';
}
//clone ticket feature
if ($escalade_config['cloneandlink_ticket']) {
$PLUGIN_HOOKS['add_javascript']['escalade'][] = 'scripts/cloneandlink_ticket.js.php';
}
//filter group feature
if ($escalade_config['use_filter_assign_group']) {
$PLUGIN_HOOKS['add_javascript']['escalade'][] = 'scripts/filtergroup.js.php';
}
}
Plugin::registerClass('PluginEscaladeGroup_Group', array('addtabon' => 'Group'));
Plugin::registerClass('PluginEscaladeUser', array('addtabon' => array('User')));
}
}
$PLUGIN_HOOKS['add_css']['escalade'][] = 'escalade.css';
// == Ticket modifications
$PLUGIN_HOOKS['item_update']['escalade'] = array('Ticket' => 'plugin_escalade_item_update');
$PLUGIN_HOOKS['item_add']['escalade'] = array('Group_Ticket' => 'plugin_escalade_item_add_group_ticket', 'Ticket_User' => 'plugin_escalade_item_add_user', 'Ticket' => 'plugin_escalade_item_add_ticket');
$PLUGIN_HOOKS['pre_item_add']['escalade'] = array('Group_Ticket' => 'plugin_escalade_pre_item_add_group_ticket', 'Ticket' => 'plugin_escalade_pre_item_add_ticket');
$PLUGIN_HOOKS['post_prepareadd']['escalade'] = array('Ticket' => 'plugin_escalade_post_prepareadd_ticket');
$PLUGIN_HOOKS['item_purge']['escalade'] = array('User' => 'plugin_escalade_item_purge');
$PLUGIN_HOOKS['item_add']['escalade']['User'] = 'plugin_escalade_item_add_user';
// == Interface links ==
if (Session::haveRight('config', UPDATE)) {
$PLUGIN_HOOKS['config_page']['escalade'] = 'front/config.form.php';
}
$PLUGIN_HOOKS['use_massive_action']['escalade'] = 1;
}
}
示例14: plugin_ticketmail_getPluginsDatabaseRelations
function plugin_ticketmail_getPluginsDatabaseRelations()
{
$plugin = new Plugin();
if ($plugin->isActivated("ticketmail")) {
return array("glpi_profiles" => array("glpi_plugin_ticketmail_profiles" => "id"));
} else {
return array();
}
}
示例15: plugin_environment_getDatabaseRelations
function plugin_environment_getDatabaseRelations()
{
$plugin = new Plugin();
if ($plugin->isActivated("environment")) {
return array("glpi_profiles" => array("glpi_plugin_environment_profiles" => "profiles_id"));
} else {
return array();
}
}