{"id":308612,"date":"2020-08-17T21:00:56","date_gmt":"2020-08-17T21:00:56","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308612"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308612","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d GLPI \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0437\u0430\u044f\u0432\u043e\u043a"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/515504\/\">\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043b\u0430\u0433\u0438\u043d GLPI \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u044f\u0432\u043a\u0430\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0437\u0430\u044f\u0432\u043e\u043a, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u0435\u0440\u0435\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0437\u0430\u044f\u0432\u043e\u043a, \u0435\u0441\u043b\u0438 \u043f\u043e \u043d\u0438\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.  <\/p>\n<blockquote><p>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u0431\u0435\u0437 \u043c\u0430\u043b\u043e\u0433\u043e \u043c\u0435\u0441\u044f\u0446 \u044f \u043a\u043e\u043f\u0430\u044e\u0441\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 helpdesk-\u0441\u0438\u0441\u0442\u0435\u043c\u044b GLPI. \u0418 \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441-\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0438\u0447\u0442\u043e\u0436\u043d\u043e \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 GLPI \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0418 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f (\u0438 \u0442\u0430 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c) \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0447\u0443\u0434\u043e-\u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0418\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u2014 \u043f\u0430\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 readthedocs, \u043f\u043b\u044e\u0441 \u043c\u0430\u043d\u0443\u0430\u043b, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 phpdoc&#8217;\u0430.<\/p>\n<p>  \u0418\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u2014 \u0447\u0430\u0442 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435 \u0438 \u0437\u0430\u0431\u0443\u0433\u043e\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u0443\u043c.  <\/p><\/blockquote>\n<p><a name=\"habracut\"><\/a>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435.<\/p>\n<p>  \u0415\u0441\u0442\u044c helpdesk-\u0441\u0438\u0441\u0442\u0435\u043c\u0430 GLPI. \u0417\u0430\u044f\u0432\u043a\u0438 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u044f\u0449\u0438\u043a, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041e\u0442\u0432\u0435\u0442 \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443. \u0412\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u0445\u043e\u0434\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0434\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0440\u0435\u0448\u0435\u043d\u0430 \u0438 \u0440\u0435\u0448\u0438\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0438\u0441\u044c\u043c\u043e \u043e \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0438 \u0437\u0430\u044f\u0432\u043a\u0438, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435, \u0430 \u0441\u0442\u0430\u0440\u044b\u0439 \u0442\u0438\u043a\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a \u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0438\u0442\u044c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/glpi-plugins.readthedocs.io\/en\/latest\/empty\/\" rel=\"nofollow\">\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/a> \u2014 \u043e\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u043f\u0443\u0442\u0451\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u043a\u0430\u0441\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:<\/p>\n<ul>\n<li>\u0418\u0434\u0451\u043c \u043d\u0430 <a href=\"https:\/\/github.com\/pluginsGLPI\/empty\" rel=\"nofollow\">\u0433\u0438\u0442\u0445\u0430\u0431<\/a> \u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438 (<em>\/path\/to\/glpi\/plugins<\/em>)<\/li>\n<li>\u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:\n<pre><code class=\"bash\">$ .\/plugin.sh YourPluginName 1.0<\/code><\/pre>\n<p>  \u0433\u0434\u0435 YourPluginName \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430, 1.0 \u2014 \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430.  <\/li>\n<\/ul>\n<p>  \u0418 \u0432\u0441\u0451, \u043a\u0430\u0440\u043a\u0430\u0441 \u0433\u043e\u0442\u043e\u0432.<\/p>\n<p>  \u0417\u0430\u0439\u0434\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u0443\u0447\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e setup.php \u0438 hook.php. \u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c composer.json. \u041c\u043d\u0435 \u043e\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e 2 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 setup.php \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 <i>plugin_init_yourpluginname<\/i> \u0438 <i>plugin_version_yourpluginname<\/i>. \u041f\u0435\u0440\u0432\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d, \u0432\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0451\u043c \u2014 \u0438\u043c\u044f, \u0430\u0432\u0442\u043e\u0440, \u0432\u0435\u0440\u0441\u0438\u044f \u0438 \u0442.\u0434.<\/p>\n<p>  \u0421\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <b>$PLUGIN_HOOKS<\/b>. \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0432\u0441\u0435 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0445\u0443\u043a\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435, \u0442\u043e \u044d\u0442\u043e \u0442.\u043d. \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043a\u0440\u044e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0451\u0440\u0433\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e \u0445\u0443\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/glpi-developer-documentation.readthedocs.io\/en\/master\/plugins\/hooks.html\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0430\u043d\u0443\u0430\u043b\u0435<\/a>.<\/p>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u0443\u043a <i>csrf_compliant<\/i>, \u0438\u043d\u0430\u0447\u0435 \u0432\u044b \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mj\/am\/18\/mjam18yk1nwutcjfmeb3w6w4sjk.png\"><\/p>\n<blockquote><p><i>\u041d\u0435 \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u0415\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u0437\u043d\u0430\u0442\u043e\u043a\u0438 GLPI, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/i><\/p><\/blockquote>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0443\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a:<\/p>\n<pre><code class=\"php\">$PLUGIN_HOOKS['config_page']['yourpluginname'] = 'config.php'; <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u0430:  <\/p>\n<pre><code class=\"php\">Plugin::registerClass(PluginYourpluginnameConfig::class); <\/code><\/pre>\n<blockquote><p>\u0418, \u043a\u0441\u0442\u0430\u0442\u0438, \u0434\u0430, \u0432 GLPI \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u043f\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0442\u0440\u0451\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: <i>Plugin + \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0432\u0430\u0448\u0435\u0433\u043e\u043f\u043b\u0430\u0433\u0438\u043d\u0430 + \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043a\u043b\u0430\u0441\u0441\u0430<\/i>. \u0412 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043b\u043e\u0432, \u0441 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e.<\/p>\n<p>  \u0424\u0430\u0439\u043b\u044b \u0438\u043c\u0435\u043d\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u043d\u043e\u0441\u0438\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 PluginYourpluginnameConfig, \u0442\u043e \u0444\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f config.class.php. \u0418 \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 inc (\u043d\u0435 \u0432 \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u0441\u0430\u0439\u0442\u0430, \u0430 \u0432 \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0438 \u0435\u0441\u043b\u0438 \u0435\u0451 \u0432 \u043f\u0430\u043f\u043a\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0435\u0442 \u2014 \u0430 \u0435\u0451 \u0442\u0430\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u2014 \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b).<\/p>\n<p>  \u041e\u0431\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0437 <a href=\"https:\/\/glpi-developer-documentation.readthedocs.io\/en\/master\/codingstandards.html\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.  <\/p><\/blockquote>\n<p>\u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0438\u043c \u0445\u0443\u043a\u0430\u043c. \u041c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u044f\u0432\u043a\u0438 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043c\u0435\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0445\u0443\u043a\u0430 <i>pre_item_add<\/i>. \u0412 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Ticket), \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0432\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 setup.php \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"php\">\/**  * Init hooks of the plugin.  * REQUIRED  *  * @return void  *\/ function plugin_init_advtickets() {    global $PLUGIN_HOOKS;     Plugin::registerClass(PluginAdvticketsEvent::class);     $PLUGIN_HOOKS['csrf_compliant']['advtickets'] = true;     $PLUGIN_HOOKS['pre_item_add']['advtickets'] = [        Ticket::class =&gt; 'plugin_advtickets_pre_item_add'    ];  }  \/**  * Get the name and the version of the plugin  * REQUIRED  *  * @return array  *\/ function plugin_version_advtickets() {    return [       'name'           =&gt; 'Adv Tickets',       'version'        =&gt; PLUGIN_ADVTICKETS_VERSION,       'author'         =&gt; 'Roman Gonyukov',       'license'        =&gt; '',       'homepage'       =&gt; 'https:\/\/github.com\/stayfuneral\/advtickets',       'requirements'   =&gt; [          'glpi' =&gt; [             'min' =&gt; '9.2',          ]       ]    ]; } <\/code><\/pre>\n<p>  \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434 (\u043a\u0441\u0442\u0430\u0442\u0438, \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a):<\/p>\n<pre><code class=\"php\">\/* \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 *\/  \/\/call a function $PLUGIN_HOOKS['hook_name']['plugin_name'] = 'function_name'; \/\/call a static method from an object $PLUGIN_HOOKS['other_hook']['plugin_name'] = ['ObjectName', 'methodName']; <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u0438 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 hook.php. \u0422\u0430\u043c \u0436\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430. \u041a \u0438\u043c\u0435\u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0442\u0435 \u0436\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u2014 plugin_yourpluginname_function_name.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u044f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0445\u0443\u043a\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u044a\u0435\u043a\u0442 Ticket, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0410 \u0432\u043e\u0442 \u0441 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c hook.php \u043b\u0438\u0448\u043d\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0445\u0443\u043a\u0430, \u0430 \u0432 \u043d\u0443\u0436\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u043b:<\/p>\n<pre><code class=\"php\">\/\/ hook.php  \/**  * @param Ticket $ticket  *  * @return bool  *\/ function plugin_advtickets_pre_item_add(Ticket $ticket) {     return PluginAdvticketsEvent::pre_item_add_ticket($ticket); } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0432 <a href=\"https:\/\/glpi-developer-documentation.readthedocs.io\/en\/master\/plugins\/database.html#creating-and-updating-tables\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443. \u041c\u043d\u0435 \u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e.<\/p>\n<p>  \u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0445\u0443\u043a\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043c\u044b \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u044f\u0432\u043a\u0443 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043b\u0430\u0441\u0441 <i>PluginAdvticketsEvent<\/i> (\u0444\u0430\u0439\u043b inc\/event.php), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <i>pre_item_add_ticket<\/i>.<\/p>\n<pre><code class=\"php\">class PluginAdvticketsEvent extends CommonDBTM {     static function pre_item_add_ticket(Ticket $ticket)     {         global $DB;  \/\/ \u0422.\u043a. \u0437\u0430\u044f\u0432\u043a\u0430 \u0435\u0449\u0451 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 input         $fields = $ticket-&gt;input;  \/\/ \u0415\u0441\u043b\u0438 \u0442\u0438\u043a\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e, \u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0435\u0433\u043e (\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0438\u043a\u0435\u0442\u0430) \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440         if($fields['_link']['tickets_id_2']) {              $relatedTicketId = $fields['_link']['tickets_id_2'];              $relatedTicketParamsForUpdate = [                 'itemtype' =&gt; \\Ticket::class, \/\/ \u0442\u0438\u043f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u044f\u0432\u043a\u0430                 'items_id' =&gt; $relatedTicketId, \/\/ id \u0437\u0430\u044f\u0432\u043a\u0438                 'users_id' =&gt; $fields['_users_id_requester'], \/\/ id \u043d\u0430\u043f\u0438\u0441\u0430\u0432\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f                 'users_id_editor' =&gt; 0,                 'content' =&gt; $fields['content'], \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0437\u0430\u044f\u0432\u043a\u0438                 'date' =&gt; date('c'),                 'date_mod' =&gt; date('c'),                 'date_creation' =&gt; date('c'),                 'is_private' =&gt; 0,                 'requesttypes_id' =&gt; $fields['requesttypes_id'], \/\/ \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a (helpdesk, email \u0438 \u0442.\u0434.)                 'timeline_position' =&gt; 4,                 'sourceitems_id' =&gt; 0,                 'sourceof_items_id' =&gt; 0             ];  \/\/ \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043e\u043a (\u043a\u0430\u043a \u0432 \u0442\u043e\u043c \u0436\u0435 \u0431\u0438\u0442\u0440\u0438\u043a\u0441\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0437\u0430\u044f\u0432\u043a\u0430\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 glpi_itilfollowups             $DB-&gt;insert('glpi_itilfollowups', $relatedTicketParamsForUpdate);  \/\/ \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u044f\u0432\u043a\u0438, \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0432 \u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &quot;\u041d\u043e\u0432\u044b\u0439&quot;. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 glpi_tickets             $DB-&gt;update('glpi_tickets', [                 'status' =&gt; 1             ], [                 'id' =&gt; $relatedTicketId             ]);  \/\/ \u0422.\u043a. \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u044f\u0432\u043a\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439, \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 input \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 false. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.             $ticket-&gt;input = false;              return $ticket-&gt;input;         }     } } <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/stayfuneral\/advtickets\" rel=\"nofollow\">\u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>  \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  <a href=\"https:\/\/glpi-project.org\/\" rel=\"nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 GLPI<\/a><br \/>  <a href=\"https:\/\/forum.glpi-project.org\/\" rel=\"nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u043e\u0440\u0443\u043c\u044b<\/a><br \/>  <a href=\"https:\/\/t.me\/glpi_ru\" rel=\"nofollow\">\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0447\u0430\u0442<\/a><br \/>  <a href=\"https:\/\/github.com\/pluginsGLPI\/example\" rel=\"nofollow\">Example-\u043f\u043b\u0430\u0433\u0438\u043d<\/a><br \/>  <a href=\"https:\/\/glpi-developer-documentation.readthedocs.io\/en\/master\/\" rel=\"nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/a><br \/>  <a href=\"https:\/\/forge.glpi-project.org\/apidoc\/\" rel=\"nofollow\">APIDoc<\/a><br \/>  <a href=\"https:\/\/glpi-plugins.readthedocs.io\" rel=\"nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/a><br \/>  <a href=\"https:\/\/www.neteye-blog.com\/2016\/12\/how-to-create-a-glpi-plugin\/\" rel=\"nofollow\">\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 GLPI<\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/515504\/\"> https:\/\/habr.com\/ru\/post\/515504\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/515504\/\">\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043b\u0430\u0433\u0438\u043d GLPI \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0437\u0430\u044f\u0432\u043a\u0430\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0437\u0430\u044f\u0432\u043e\u043a, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u0435\u0440\u0435\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0437\u0430\u044f\u0432\u043e\u043a, \u0435\u0441\u043b\u0438 \u043f\u043e \u043d\u0438\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.  <\/p>\n<blockquote><p>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u0431\u0435\u0437 \u043c\u0430\u043b\u043e\u0433\u043e \u043c\u0435\u0441\u044f\u0446 \u044f \u043a\u043e\u043f\u0430\u044e\u0441\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 helpdesk-\u0441\u0438\u0441\u0442\u0435\u043c\u044b GLPI. \u0418 \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441-\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0438\u0447\u0442\u043e\u0436\u043d\u043e \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 GLPI \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0418 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f (\u0438 \u0442\u0430 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c) \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0447\u0443\u0434\u043e-\u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0418\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u2014 \u043f\u0430\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 readthedocs, \u043f\u043b\u044e\u0441 \u043c\u0430\u043d\u0443\u0430\u043b, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 phpdoc&#8217;\u0430.<\/p>\n<p>  \u0418\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u2014 \u0447\u0430\u0442 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435 \u0438 \u0437\u0430\u0431\u0443\u0433\u043e\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u0443\u043c.  <\/p><\/blockquote>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-308612","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=308612"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308612\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}