vendor/sensio/generator-bundle/Command/GenerateDoctrineFormCommand.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sensio\Bundle\GeneratorBundle\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Sensio\Bundle\GeneratorBundle\Generator\DoctrineFormGenerator;
/**
* Generates a form type class for a given Doctrine entity.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Hugo Hamon <hugo.hamon@sensio.com>
*/
class GenerateDoctrineFormCommand extends GenerateDoctrineCommand
{
/**
* @see Command
*/
protected function configure()
{
$this
->setName('doctrine:generate:form')
->setAliases(array('generate:doctrine:form'))
->setDescription('Generates a form type class based on a Doctrine entity')
->setDefinition(array(
new InputArgument('entity', InputArgument::REQUIRED, 'The entity class name to initialize (shortcut notation)'),
))
->setHelp(<<<EOT
The <info>%command.name%</info> command generates a form class based on a Doctrine entity.
<info>php %command.full_name% AcmeBlogBundle:Post</info>
Every generated file is based on a template. There are default templates but they can be overridden by placing custom templates in one of the following locations, by order of priority:
<info>BUNDLE_PATH/Resources/SensioGeneratorBundle/skeleton/form
APP_PATH/Resources/SensioGeneratorBundle/skeleton/form</info>
You can check https://github.com/sensio/SensioGeneratorBundle/tree/master/Resources/skeleton
in order to know the file structure of the skeleton
EOT
)
;
}
/**
* @see Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。