用途:指导在 Bitrix 的 /local/modules 目录下开发自定义模块,基线 main 23.0+,已验证 main 26.800.0。
主要能力与规则: 新建模块涉及 id、骨架、install/index.php、版本、语言文件与卸载,见 rules/installer.md。 表、事件、代理放在 install/migrations/*.php(main 26.600+),见 rules/install-migrations.md。 选项页、default_option.php、PSR-4 自动加载与模块路由,见 rules/options-autoload.md。
不变量:模块目录为 /local/modules/<vendor>.<module>/;id 小写 vendor.module;安装器类 vendor_module;命名空间 Vendor\Module(单词 id mymodule 对应 Bitrix\Mymodule)。模块未注册到 b_module 前一切无效:Loader::includeModule() 返回 false,模块 .settings.php(services、controllers、console、messenger)也不会被读取。安装与卸载需对称:创建的表、处理器、代理和选项都要有移除路径,重复安装不得失败。事件注册使用内核参数名(fromModuleId:)或位置参数,处理器签名取决于调度器(bitrix-events)。模块路由需从 /local/routes/web.php 引入,模块 .settings.php 中的 routing 段会被忽略(bitrix-routing)。项目数据/内容迁移(信息块、按环境的选项)属于 bitrix-sprint-migration,不属于安装器。
限制:资料未提供具体命令示例、收费或平台信息,暂未提供。