• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/cli/ormannotatecommand.php
  • Класс: BitrixMainCliOrmAnnotateCommand
  • Вызов: OrmAnnotateCommand::configure
protected function configure()
{
	$inBitrixDir = realpath(Application::getDocumentRoot().Application::getPersonalRoot()) === realpath(getcwd());

	$this
		// the name of the command (the part after "bin/console")
		->setName('orm:annotate')

		// the short description shown while running "php bin/console list"
		->setDescription('Scans project for ORM Entities.')

		// the full command description shown when running the command with
		// the "--help" option
		->setHelp('This system command optimizes Entity Relation Map building.')

		->setDefinition(
			new InputDefinition(array(
				new InputArgument(
					'output', InputArgument::OPTIONAL, 'File for annotations to be saved to',
					$inBitrixDir
						? 'modules/orm_annotations.php'
						: Application::getDocumentRoot().Application::getPersonalRoot().'/modules/orm_annotations.php'
				),
				new InputOption(
					'modules', 'm', InputOption::VALUE_OPTIONAL,
					'Modules to be scanned, separated by comma.', 'main'
				),
				new InputOption(
					'clean', 'c', InputOption::VALUE_NONE,
					'Clean current entity map.'
				),
			))
		)
	;

	// disable Loader::requireModule exception
	Loader::setRequireThrowException(false);
}