N98\Magento\Command\Developer\Setup\Script\AttributeCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | null | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат integer | null | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (!$this->initMagento()) {
            return;
        }
        try {
            $entityType = $input->getArgument('entityType');
            $attributeCode = $input->getArgument('attributeCode');
            $attribute = $this->getAttribute($entityType, $attributeCode);
            $generator = Attribute\EntityType\Factory::create($entityType, $attribute);
            $generator->setReadConnection($this->_getModel('core/resource', 'Mage_Core_Model_Resource')->getConnection('core_read'));
            $code = $generator->generateCode();
            $warnings = $generator->getWarnings();
            $output->writeln(implode(PHP_EOL, $warnings) . PHP_EOL . $code);
        } catch (Exception $e) {
            $output->writeln('<error>' . $e->getMessage() . '</error>');
        }
    }