Views: 4597
Last Modified: 18.01.2024
Command interface is implemented based on the library symfony/console
. Before using it, ensure that your have installed dependencies via composer.
Executed file is located in the folder bitrix
:
$ cd bitrix
$ php bitrix.php
For convenience, create a symbolic link without php postfix:
$ chmod +x bitrix.php
$ ln -s bitrix.php bitrix
$ ./bitrix
List of commands available "out of the box":
Starting from main 24.0.0 an option is now available to add your own commands via module's {moduleName}/.settings.php
file. Module commands are listed in the section console:
<?php
return [
//...
'console' => [
'value' => [
'commands' => [
\Module\Name\Cli\CustomCommand::class,
\Module\Name\Feature\Path\Cli\AnotherCommand::class,
],
],
'readonly' => true,
],
];
Note: It's recommended to use module title as prefix, such as module:command
.
Additional information: