{"id":454041,"date":"2025-04-01T15:45:04","date_gmt":"2025-04-01T15:45:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=454041"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=454041","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u043f\u0440\u0438\u0440\u0443\u0447\u0438\u043b\u0438 \u0440\u0443\u0442\u0438\u043d\u0443 \u0432 1C-\u0411\u0438\u0442\u0440\u0438\u043a\u0441: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 CLI-\u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/48c\/ac7\/932\/48cac7932c1b404bef994035cd30cd78.jpg\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/48c\/ac7\/932\/48cac7932c1b404bef994035cd30cd78.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435<\/strong>: \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u0436\u0430\u0442\u044b\u0435 \u0441\u0440\u043e\u043a\u0438, \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0437\u0430\u0434\u0430\u0447. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043b\u0430\u0441\u0441\u044b, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u2014 \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u0441 \u043d\u0443\u043b\u044f. \u0412\u0441\u0451 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c, \u043d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0437\u0430\u0431\u0438\u0440\u0430\u044e\u0442 \u043c\u0430\u0441\u0441\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u0438\u043b.<\/p>\n<p>\u041c\u044b \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c\u00a0\u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0435 \u0440\u0430\u0437. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0440\u0443\u0442\u0438\u043d\u043e\u0439, \u0440\u0435\u0448\u0438\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 CLI-\u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 1C-\u0411\u0438\u0442\u0440\u0438\u043a\u0441. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u0440\u0442\u0443\u0440 \u041d\u0438\u0437\u0430\u043c\u043e\u0432, \u044f \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u041d\u041b\u041c\u041a \u0418\u0422. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043d\u0430\u0441 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438 \u043a\u0430\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e.  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0438 \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438: \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442?<\/h3>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 1C-\u0411\u0438\u0442\u0440\u0438\u043a\u0441 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u043b\u043e \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/strong>\u00a0\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u00a0<code>class.php<\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f AJAX) \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u00a0<code>lang<\/code>-\u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/strong>\u00a0\u0440\u0443\u0447\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u043f\u043a\u0438\u00a0<code>templates<\/code>, \u0444\u0430\u0439\u043b\u043e\u0432\u00a0<code>template.php<\/code>,\u00a0<code>result_modifier.php<\/code>\u00a0\u0438 \u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/strong>\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0430\u044f\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u00a0<code>install.php<\/code>,\u00a0<code>include.php<\/code>,\u00a0<code>options.php<\/code>\u00a0\u0438 \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043c\u044b \u044f\u0441\u043d\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438, \u0447\u0442\u043e \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0434\u0430\u0447 \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u041f\u043e\u0442\u0435\u0440\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/strong>\u00a0\u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0430\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0448\u0438\u0431\u043a\u0438:<\/strong>\u00a0\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0437\u0430\u0431\u044b\u0442\u044b\u0439 \u0444\u0430\u0439\u043b \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c:<\/strong>\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u043d\u043e\u0441\u0438\u043b \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u043b\u043e \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 \u043a\u0440\u0443\u043f\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 40 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u043e\u0442\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0438\u0441\u044c. \u0418 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u0444\u0438\u0447\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0442\u0435\u0440\u044f\u043b\u0438 \u0447\u0430\u0441\u044b \u0438 \u0434\u043d\u0438 \u043d\u0430 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0422\u0430\u043a \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 CLI-\u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u0437\u0432\u0430\u043b\u0438\u00a0<strong>bitrix.mate<\/strong>\u00a0\u2014 \u043e\u043d \u0441\u0442\u0430\u043b \u043d\u0430\u0448\u0438\u043c &#171;\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0438 \u043d\u0430\u043f\u0430\u0440\u043d\u0438\u043a\u043e\u043c&#187; \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n<hr\/>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 bitrix.mate: \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u00a0<code>doc:orm-plant-uml<\/code>\u00a0\u0438\u00a0<code>component:make<\/code>, \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0430\u0448\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u043a\u0430\u043a\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442.<\/p>\n<h4>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 doc:orm-plant-uml<\/h4>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u0430\u00a0<code>doc:orm-plant-uml<\/code>\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 PlantUML-\u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u0437 ORM-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0441\u0432\u044f\u0437\u0438, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438:<\/strong><\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Symfony Console \u2014 \u044d\u0442\u043e \u0434\u0430\u043b\u043e \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"bash\">bitrix-mate doc:orm-plant-uml \/path\/to\/MyEntity.php -r<\/code><\/pre>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e:<\/h3>\n<p>CreateOrmPlantUmlCommand\u00a0\u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u0432\u00a0OrmPlantUmlAction, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 ORM-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0441\u0432\u044f\u0437\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 PlantUML.<\/p>\n<details class=\"spoiler\">\n<summary>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">use Bitrix\\Main\\Localization\\Loc; use NLMK\\Bitrix\\Mate\\Action\\Doc\\OrmPlantUmlAction; use RuntimeException; use Symfony\\Component\\Console\\Command\\Command; use Symfony\\Component\\Console\\Input\\InputArgument; use Symfony\\Component\\Console\\Input\\InputInterface; use Symfony\\Component\\Console\\Input\\InputOption; use Symfony\\Component\\Console\\Output\\OutputInterface; use Throwable;   class CreateOrmPlantUmlCommand extends Command {       protected function configure()     {         $this             -&gt;setName('doc:orm-plant-uml')             -&gt;setDescription('\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 plantuml')             -&gt;setHelp('\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c plantuml \u0434\u043b\u044f orm')             -&gt;addArgument('path', InputArgument::REQUIRED, '\u041f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043b\u0430\u0441\u0441\u0430')             -&gt;addOption('recursive', 'r', InputOption::VALUE_NONE, '\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0438')         ;     }       protected function execute(InputInterface $input, OutputInterface $output): int     {         try {             $path = $input-&gt;getArgument('path');             $isRecursive = $input-&gt;getOption('recursive') ?? false;               if (!$path) {                 throw new RuntimeException('Path is required');             }               $filePath = (new OrmPlantUmlAction())-&gt;run($path, $isRecursive);               $output-&gt;writeln(Loc::getMessage('NLMK_BITRIX_MATE_COMMAND_DOC_PLANT_UML_SUCCESS', [                 '#DOC_PATH#' =&gt; $filePath,             ]));               return Command::SUCCESS;           } catch (Throwable $throwable) {             $output-&gt;writeln(Loc::getMessage('NLMK_BITRIX_MATE_COMMAND_DOC_PLANT_UML_ERROR', [                 '#ERROR#' =&gt; $throwable-&gt;getMessage()             ]));         }           return Command::FAILURE;     }   }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 OrmPlantUmlAction<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">use Bitrix\\Main\\Entity\\ScalarField; use Bitrix\\Main\\ORM\\Data\\DataManager; use Bitrix\\Main\\ORM\\Fields\\Relations\\Reference; use NLMK\\Bitrix\\Mate\\Service\\PathService; use RuntimeException;   class OrmPlantUmlAction {       protected PathService $pathService;       public function __construct()     {         $this-&gt;pathService = new PathService();     }       public function run(string $pathClass, bool $isRecursive): string     {         \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443         $filePath = sprintf('%s\/%s', $this-&gt;pathService-&gt;root(), $pathClass);           if (!file_exists($filePath)) {             throw new RuntimeException('The file does not exist');         }           require_once $filePath;           \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430         $classes = get_declared_classes();         $className = end($classes);           if (!is_subclass_of($className, DataManager::class)) {             throw new RuntimeException('The file does not contain a DataManager class');         }           \/\/\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044f\u0445         $entities = [$className =&gt; $this-&gt;processEntity($className)];           $umlContent = [\"@startuml\"];         $referenceContent = [];         foreach ($entities as $content) {             $umlContent = [...$umlContent, ...$content['structure']];               if (!$isRecursive) {                 continue;             }               $this-&gt;processReferences(                 content: $content,                 umlContent: $umlContent,                 entities: $entities,                 referenceContent: $referenceContent             );         }           $umlContent = [...$umlContent, ...$referenceContent];           $umlContent[] = \"@enduml\";           \/\/puml \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0440\u044f\u0434\u043e\u043c \u0441 ORM-\u043a\u043b\u0430\u0441\u0441\u043e\u043c         $outputPath = preg_replace('\/\\.php$\/', '.puml', $filePath);         file_put_contents($outputPath, implode(\"\\n\", $umlContent));           return $outputPath;     }       protected function processEntity(string $className): array     {         \/** @var DataManager $entity *\/         $entity = new $className();         $entityName = $entity::getTableName();         $structure = [\"entity $entityName {\"];         $references = [];           foreach ($entity::getMap() as $field) {             \/\/\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044f\u0445             if ($field instanceof ScalarField) {                 $fieldLine = \"  {$field-&gt;getName()} : {$field-&gt;getDataType()}\";                 if ($field-&gt;isPrimary()) {                     $fieldLine .= \" &lt;&lt;PK&gt;&gt;\";                 }                 if (!$field-&gt;isNullable()) {                     $fieldLine .= \" &lt;&lt;Mandatory&gt;&gt;\";                 }                 if (!$field-&gt;getTitle()) {                     $fieldLine .= \" -- {$field-&gt;getTitle()}\";                 }                 $structure[] = $fieldLine;                 continue;             }               \/\/\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0435\u0444\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u043e\u043b\u044f\u0445             if ($field instanceof Reference) {                 $refEntity = $field-&gt;getRefEntity();                 $references[] = [                     'class' =&gt; $refEntity-&gt;getDataClass(),                     'field' =&gt; $field-&gt;getName(),                     'thisEntity' =&gt; $entityName,                     'refEntity' =&gt; $refEntity-&gt;getDataClass()::getTableName(),                 ];             }         }           $structure[] = \"}\";           return ['structure' =&gt; $structure, 'references' =&gt; $references];     }       protected function processReferences(array $content, array &amp;$umlContent, array &amp;$entities, array &amp;$referenceContent): void     {         \/\/\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0440\u0435\u0444\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c         foreach ($content['references'] as $reference) {             if (!isset($entities[$reference['class']])) {                 \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438                 $referenceEntityContent = $this-&gt;processEntity($reference['class']);                 \/\/\u0434\u043e\u0431\u0430\u0432\u044f\u043b\u0435\u043c \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a \u0436\u0435 \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0435\u0435 \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438                 $entities[$reference['class']] = $referenceEntityContent;                 $umlContent = [...$umlContent, ...$entities[$reference['class']]['structure']];                 $this-&gt;processReferences($referenceEntityContent, $umlContent, $entities, $referenceContent);             }             $referenceContent[] = \"{$reference['thisEntity']}::{$reference['field']} ||--|| {$reference['refEntity']}\";         }     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u0430\u0441\u0441 ORM<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">use Bitrix\\Main\\ORM\\Data\\DataManager; use Bitrix\\Main\\ORM\\Fields\\IntegerField; use Bitrix\\Main\\ORM\\Fields\\Relations\\Reference; use Bitrix\\Main\\ORM\\Fields\\StringField; use Bitrix\\Main\\ORM\\Query\\Join;   class MyDictionaryEntityTable extends DataManager {     public static function getTableName()     {         return 'my_dictionary_entity';     }       public static function getMap()     {         return [             (new IntegerField('ID'))-&gt;configurePrimary()-&gt;configureAutocomplete(),             (new StringField('NAME'))-&gt;configureRequired()-&gt;configureTitle('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435'),         ];     } }   class MyParentEntityTable extends DataManager {     public static function getTableName()     {         return 'my_parent_entity';     }       public static function getMap()     {         return [             (new IntegerField('ID'))-&gt;configurePrimary()-&gt;configureAutocomplete(),             (new StringField('NAME'))-&gt;configureRequired()-&gt;configureTitle('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435'),             (new IntegerField('DICTIONARY_ID'))-&gt;configureNullable()-&gt;configureTitle('\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a'),             (new Reference(                 'DICTIONARY',                 MyDictionaryEntityTable::class,                 Join::on('this.DICTIONARY_ID', 'ref.ID')             ))         ];     } }   class MyChildEntityTable extends DataManager {     public static function getTableName()     {         return 'my_child_entity';     }       public static function getMap()     {         return [             (new IntegerField('ID'))-&gt;configurePrimary()-&gt;configureAutocomplete(),             (new StringField('NAME'))-&gt;configureRequired()-&gt;configureTitle('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435'),             (new IntegerField('PARENT_ID'))-&gt;configureNullable()-&gt;configureTitle('\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c'),             (new Reference(                 'PARENT',                 MyParentEntityTable::class,                 Join::on('this.PARENT_ID', 'ref.ID')             ))         ];     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 PlantUML<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>@startuml entity my_child_entity {   ID : integer &lt;&lt;PK&gt;&gt; &lt;&lt;Mandatory&gt;&gt; -- ID   NAME : string &lt;&lt;Mandatory&gt;&gt; -- \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435   PARENT_ID : integer -- \u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c } entity my_parent_entity {   ID : integer &lt;&lt;PK&gt;&gt; &lt;&lt;Mandatory&gt;&gt; -- ID   NAME : string &lt;&lt;Mandatory&gt;&gt; -- \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435   DICTIONARY_ID : integer -- \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a } entity my_dictionary_entity {   ID : integer &lt;&lt;PK&gt;&gt; &lt;&lt;Mandatory&gt;&gt; -- ID   NAME : string &lt;&lt;Mandatory&gt;&gt; -- \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 } my_parent_entity::DICTIONARY ||--|| my_dictionary_entity my_child_entity::PARENT ||--|| my_parent_entity @enduml<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0443\u0447\u043d\u0430\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0442 30 \u043c\u0438\u043d\u0443\u0442 \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0447\u0430\u0441\u043e\u0432, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u00a0\u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043c\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0438 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442, \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044f 25-45 \u043c\u0438\u043d\u0443\u0442 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 component:make<\/h4>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c, \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0412 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 Bitrix \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438: \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u00a0<code>class.php<\/code>, \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f AJAX \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u0412\u0441\u0451 \u044d\u0442\u043e \u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u00a0<code>component:make<\/code>.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"bash\">bitrix-mate component:make nlmk:test<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0443\u0442\u043e\u0447\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/afc\/9d5\/5f3\/afc9d55f3fb992552adcc8e3b67b87ea.png\" alt=\"\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0444\u043b\u0430\u0433\u0430 -f \u0438\u043b\u0438 --full \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a &quot;y&quot;\" title=\"\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0444\u043b\u0430\u0433\u0430 -f \u0438\u043b\u0438 --full \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a &quot;y&quot;\" width=\"980\" height=\"336\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/afc\/9d5\/5f3\/afc9d55f3fb992552adcc8e3b67b87ea.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0444\u043b\u0430\u0433\u0430 -f \u0438\u043b\u0438 &#8212;full \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a &#171;y&#187;<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/277\/015\/a6f\/277015a6f2650178eb497c201a20f87d.png\" alt=\"\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\" title=\"\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\" width=\"359\" height=\"359\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/277\/015\/a6f\/277015a6f2650178eb497c201a20f87d.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php   namespace Nlmk\\Components;  use Bitrix\\Main\\Engine\\ActionFilter\\HttpMethod; use Bitrix\\Main\\Engine\\ActionFilter\\Csrf; use Bitrix\\Main\\Engine\\Contract\\Controllerable; use Bitrix\\Main\\Engine\\Response\\AjaxJson; use Bitrix\\Main\\Error; use Bitrix\\Main\\Errorable; use Bitrix\\Main\\ErrorCollection; use Bitrix\\Main\\Localization\\Loc; use CBitrixComponent; use Throwable;   class Test extends CBitrixComponent implements Controllerable, Errorable {     protected ErrorCollection $errorCollection;       public function __construct($component = null)     {         $this-&gt;errorCollection = new ErrorCollection();         parent::__construct($component);     }           public function executeComponent(): void     {         try {             \/\/@TODO: your code         } catch (Throwable $throwable) {             \/\/@TODO: log $throwable-&gt;getMessage()             \/\/@TODO $this-&gt;setError(Loc::getMessage('YOUR_SYSTEM_LANG_CODE');         }         if (!$this-&gt;errorCollection-&gt;isEmpty()) {             $this-&gt;arResult['ERRORS'] = $this-&gt;getErrors();         }         $this-&gt;includeComponentTemplate();     }            public function configureActions(): array     {         return [             \/** @see self::getAction() *\/             'get' =&gt; [                 'prefilters' =&gt; [                     new HttpMethod([HttpMethod::METHOD_POST]),                     new Csrf(),                 ],             ],         ];     }           public function getAction(): AjaxJson     {         $returnData = [];         try {             \/\/@TODO: your code         } catch (Throwable $throwable) {             \/\/@TODO: log $throwable-&gt;getMessage()             \/\/@TODO $this-&gt;setError(Loc::getMessage('YOUR_SYSTEM_LANG_CODE');         }           return $this-&gt;responseAjax($returnData);     }            \/**      * @param string $message      *      * @return void      *\/     protected function setError(string $message): void     {         $this-&gt;errorCollection-&gt;setError(new Error($message));     }           \/**      * @inheritDoc      *\/     public function getErrors(): array     {         return $this-&gt;errorCollection-&gt;toArray();     }       \/**      * @inheritDoc      *\/     public function getErrorByCode($code): Error     {         return $this-&gt;errorCollection-&gt;getErrorByCode($code);     }           protected function listKeysSignedParameters(): array     {         return [             \/\/@TODO your params         ];     }           \/**      * @param array|null $data      *      * @return AjaxJson      *\/     protected function responseAjax(?array $data = []): AjaxJson     {         return new AjaxJson(             $data,             $this-&gt;errorCollection-&gt;isEmpty() ? AjaxJson::STATUS_SUCCESS : AjaxJson::STATUS_ERROR,             $this-&gt;errorCollection         );     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0440\u0443\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0442 15 \u0434\u043e 50 \u043c\u0438\u043d\u0443\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043c\u044b \u0441\u043d\u0438\u0437\u0438\u043b\u0438 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e 1-2 \u043c\u0438\u043d\u0443\u0442, \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044f 10-48 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442.<\/p>\n<hr\/>\n<h3>\u0427\u0442\u043e \u0435\u0449\u0451 \u0443\u043c\u0435\u0435\u0442 bitrix.mate<\/h3>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u0448 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/strong>\u00a0\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438\u00a0<code>install.php<\/code>,\u00a0\u00a0<code>options.php, default_option.php\u00a0<\/code>\u0438\u00a0<code>lang<\/code>, \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0428\u0430\u0431\u043b\u043e\u043d\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/strong>\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u00a0<code>template.php<\/code>,\u00a0<code>styles.css<\/code>\u00a0\u0438\u00a0<code>result_modifier.php<\/code>\u00a0\u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 (\u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435, \u0442\u0430\u043a \u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430).<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0435\u0449\u0451 bitrix.mate \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u044c, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u044f OnCollectCommands. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 bitrix.mate \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0433\u0438\u0431\u043a\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.<\/p>\n<hr\/>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043c\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p><strong>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/strong>\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0430 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 1-2 \u0447\u0430\u0441\u0430 \u0437\u0430 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e. \u0412 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u044d\u0442\u0430 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f:<\/strong>\u00a0\u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044e\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0435\u043d\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a:<\/strong>\u00a0\u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0443\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u2014 \u0432\u0441\u0451 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 CLI-\u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u0442\u0430\u043b \u0432\u0430\u0436\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435. \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0432 \u043e\u043f\u044b\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0430\u0448\u0443 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u0449\u0435 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438\u0434\u0435\u0438? \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0438\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445! \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u043d\u0430\u0448 \u043e\u043f\u044b\u0442 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0442 \u0432\u0430\u0441 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043b\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0439. \u041c\u044b \u0432\u0441\u0435 \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u2014 \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0443\u0442\u0438\u043d\u044b, \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/868300\/\"> https:\/\/habr.com\/ru\/articles\/868300\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435<\/strong>: \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u0436\u0430\u0442\u044b\u0435 \u0441\u0440\u043e\u043a\u0438, \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0437\u0430\u0434\u0430\u0447. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043b\u0430\u0441\u0441\u044b, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u2014 \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u0441 \u043d\u0443\u043b\u044f. \u0412\u0441\u0451 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c, \u043d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0437\u0430\u0431\u0438\u0440\u0430\u044e\u0442 \u043c\u0430\u0441\u0441\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u0438\u043b.<\/p>\n<p>\u041c\u044b \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c\u00a0\u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0435 \u0440\u0430\u0437. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0440\u0443\u0442\u0438\u043d\u043e\u0439, \u0440\u0435\u0448\u0438\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 CLI-\u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 1C-\u0411\u0438\u0442\u0440\u0438\u043a\u0441. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u0440\u0442\u0443\u0440 \u041d\u0438\u0437\u0430\u043c\u043e\u0432, \u044f \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u041d\u041b\u041c\u041a \u0418\u0422. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043d\u0430\u0441 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438 \u043a\u0430\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e.  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0438 \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438: \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442?<\/h3>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 1C-\u0411\u0438\u0442\u0440\u0438\u043a\u0441 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u043b\u043e \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/strong>\u00a0\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u00a0<code>class.php<\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f AJAX) \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u00a0<code>lang<\/code>-\u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/strong>\u00a0\u0440\u0443\u0447\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u043f\u043a\u0438\u00a0<code>templates<\/code>, \u0444\u0430\u0439\u043b\u043e\u0432\u00a0<code>template.php<\/code>,\u00a0<code>result_modifier.php<\/code>\u00a0\u0438 \u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/strong>\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0430\u044f\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u00a0<code>install.php<\/code>,\u00a0<code>include.php<\/code>,\u00a0<code>options.php<\/code>\u00a0\u0438 \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043c\u044b \u044f\u0441\u043d\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438, \u0447\u0442\u043e \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0434\u0430\u0447 \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u041f\u043e\u0442\u0435\u0440\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/strong>\u00a0\u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0430\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0448\u0438\u0431\u043a\u0438:<\/strong>\u00a0\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0437\u0430\u0431\u044b\u0442\u044b\u0439 \u0444\u0430\u0439\u043b \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c:<\/strong>\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u043d\u043e\u0441\u0438\u043b \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u043b\u043e \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 \u043a\u0440\u0443\u043f\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 40 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441\u043e\u0442\u043d\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0438\u0441\u044c. \u0418 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u0444\u0438\u0447\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0442\u0435\u0440\u044f\u043b\u0438 \u0447\u0430\u0441\u044b \u0438 \u0434\u043d\u0438 \u043d\u0430 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0422\u0430\u043a \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 CLI-\u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u0437\u0432\u0430\u043b\u0438\u00a0<strong>bitrix.mate<\/strong>\u00a0\u2014 \u043e\u043d \u0441\u0442\u0430\u043b \u043d\u0430\u0448\u0438\u043c &#171;\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0438 \u043d\u0430\u043f\u0430\u0440\u043d\u0438\u043a\u043e\u043c&#187; \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n<hr\/>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 bitrix.mate: \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u00a0<code>doc:orm-plant-uml<\/code>\u00a0\u0438\u00a0<code>component:make<\/code>, \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0430\u0448\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u043a\u0430\u043a\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442.<\/p>\n<h4>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 doc:orm-plant-uml<\/h4>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u0430\u00a0<code>doc:orm-plant-uml<\/code>\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 PlantUML-\u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u0437 ORM-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0441\u0432\u044f\u0437\u0438, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438:<\/strong><\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Symfony Console \u2014 \u044d\u0442\u043e \u0434\u0430\u043b\u043e \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440:<\/strong><\/p>\n<pre><code class=\"bash\">bitrix-mate doc:orm-plant-uml \/path\/to\/MyEntity.php -r<\/code><\/pre>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e:<\/h3>\n<p>CreateOrmPlantUmlCommand\u00a0\u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u0432\u00a0OrmPlantUmlAction, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 ORM-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0441\u0432\u044f\u0437\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 PlantUML.<\/p>\n<details class=\"spoiler\">\n<summary>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">use Bitrix\\Main\\Localization\\Loc; use NLMK\\Bitrix\\Mate\\Action\\Doc\\OrmPlantUmlAction; use RuntimeException; use Symfony\\Component\\Console\\Command\\Command; use Symfony\\Component\\Console\\Input\\InputArgument; use Symfony\\Component\\Console\\Input\\InputInterface; use Symfony\\Component\\Console\\Input\\InputOption; use Symfony\\Component\\Console\\Output\\OutputInterface; use Throwable;   class CreateOrmPlantUmlCommand extends Command {       protected function configure()     {         $this             -&gt;setName('doc:orm-plant-uml')             -&gt;setDescription('\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 plantuml')             -&gt;setHelp('\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c plantuml \u0434\u043b\u044f orm')             -&gt;addArgument('path', InputArgument::REQUIRED, '\u041f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043b\u0430\u0441\u0441\u0430')             -&gt;addOption('recursive', 'r', InputOption::VALUE_NONE, '\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0438')         ;     }       protected function execute(InputInterface $input, OutputInterface $output): int     {         try {             $path = $input-&gt;getArgument('path');             $isRecursive = $input-&gt;getOption('recursive') ?? false;               if (!$path) {                 throw new RuntimeException('Path is required');             }               $filePath = (new OrmPlantUmlAction())-&gt;run($path, $isRecursive);               $output-&gt;writeln(Loc::getMessage('NLMK_BITRIX_MATE_COMMAND_DOC_PLANT_UML_SUCCESS', [                 '#DOC_PATH#' =&gt; $filePath,             ]));               return Command::SUCCESS;           } catch (Throwable $throwable) {             $output-&gt;writeln(Loc::getMessage('NLMK_BITRIX_MATE_COMMAND_DOC_PLANT_UML_ERROR', [                 '#ERROR#' =&gt; $throwable-&gt;getMessage()             ]));         }           return Command::FAILURE;     }   }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 OrmPlantUmlAction<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">use Bitrix\\Main\\Entity\\ScalarField; use Bitrix\\Main\\ORM\\Data\\DataManager; use Bitrix\\Main\\ORM\\Fields\\Relations\\Reference; use NLMK\\Bitrix\\Mate\\Service\\PathService; use RuntimeException;   class OrmPlantUmlAction {       protected PathService $pathService;       public function __construct()     {         $this-&gt;pathService = new PathService();     }       public function run(string $pathClass, bool $isRecursive): string     {         \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443         $filePath = sprintf('%s\/%s', $this-&gt;pathService-&gt;root(), $pathClass);           if (!file_exists($filePath)) {             throw new RuntimeException('The file does not exist');         }           require_once $filePath;           \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430         $classes = get_declared_classes();         $className = end($classes);           if (!is_subclass_of($className, DataManager::class)) {             throw new RuntimeException('The file does not contain a DataManager class');         }           \/\/\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044f\u0445         $entities = [$className =&gt; $this-&gt;processEntity($className)];           $umlContent = [\"@startuml\"];         $referenceContent = [];         foreach ($entities as $content) {             $umlContent = [...$umlContent, ...$content['structure']];               if (!$isRecursive) {                 continue;             }               $this-&gt;processReferences(                 content: $content,                 umlContent: $umlContent,                 entities: $entities,                 referenceContent: $referenceContent             );         }           $umlContent = [...$umlContent, ...$referenceContent];           $umlContent[] = \"@enduml\";           \/\/puml \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0440\u044f\u0434\u043e\u043c \u0441 ORM-\u043a\u043b\u0430\u0441\u0441\u043e\u043c         $outputPath = preg_replace('\/\\.php$\/', '.puml', $filePath);         file_put_contents($outputPath, implode(\"\\n\", $umlContent));           return $outputPath;     }       protected function processEntity(string $className): array     {         \/** @var DataManager $entity *\/         $entity = new $className();         $entityName = $entity::getTableName();         $structure = [\"entity $entityName {\"];         $references = [];           foreach ($entity::getMap() as $field) {             \/\/\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044f\u0445             if ($field instanceof ScalarField) {                 $fieldLine = \"  {$field-&gt;getName()} : {$field-&gt;getDataType()}\";                 if ($field-&gt;isPrimary()) {                     $fieldLine .= \" &lt;&lt;PK&gt;&gt;\";                 }                 if (!$field-&gt;isNullable()) {                     $fieldLine .= \" &lt;&lt;Mandatory&gt;&gt;\";                 }                 if (!$field-&gt;getTitle()) {                     $fieldLine .= \" -- {$field-&gt;getTitle()}\";                 }                 $structure[] = $fieldLine;                 continue;             }               \/\/\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0435\u0444\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u043e\u043b\u044f\u0445             if ($field instanceof Reference) {                 $refEntity = $field-&gt;getRefEntity();                 $references[] = [                     'class' =&gt; $refEntity-&gt;getDataClass(),                     'field' =&gt; $field-&gt;getName(),                     'thisEntity' =&gt; $entityName,                     'refEntity' =&gt; $refEntity-&gt;getDataClass()::getTableName(),                 ];             }         }           $structure[] = \"}\";           return ['structure' =&gt; $structure, 'references' =&gt; $references];     }       protected function processReferences(array $content, array &amp;$umlContent, array &amp;$entities, array &amp;$referenceContent): void     {         \/\/\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0440\u0435\u0444\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c         foreach ($content['references'] as $reference) {             if (!isset($entities[$reference['class']])) {                 \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438                 $referenceEntityContent = $this-&gt;processEntity($reference['class']);                 \/\/\u0434\u043e\u0431\u0430\u0432\u044f\u043b\u0435\u043c \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a \u0436\u0435 \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0435\u0435 \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438                 $entities[$reference['class']] = $referenceEntityContent;                 $umlContent = [...$umlContent, ...$entities[$reference['class']]['structure']];                 $this-&gt;processReferences($referenceEntityContent, $umlContent, $entities, $referenceContent);             }             $referenceContent[] = \"{$reference['thisEntity']}::{$reference['field']} ||--|| {$reference['refEntity']}\";         }     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u0430\u0441\u0441 ORM<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">use Bitrix\\Main\\ORM\\Data\\DataManager; use Bitrix\\Main\\ORM\\Fields\\IntegerField; use Bitrix\\Main\\ORM\\Fields\\Relations\\Reference; use Bitrix\\Main\\ORM\\Fields\\StringField; use Bitrix\\Main\\ORM\\Query\\Join;   class MyDictionaryEntityTable extends DataManager {     public static function getTableName()     {         return 'my_dictionary_entity';     }       public static function getMap()     {         return [             (new IntegerField('ID'))-&gt;configurePrimary()-&gt;configureAutocomplete(),             (new StringField('NAME'))-&gt;configureRequired()-&gt;configureTitle('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435'),         ];     } }   class MyParentEntityTable extends DataManager {     public static function<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-454041","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/454041","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=454041"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/454041\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=454041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=454041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=454041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}