| a | b | |
|---|
| 0 | + | <?php |
|---|
| 0 | + | |
|---|
| 0 | + | namespace Chamilo; |
|---|
| 0 | + | |
|---|
| 0 | + | use Chamilo\Package; |
|---|
| 0 | + | use Chamilo\ImporterForm; |
|---|
| 0 | + | use Symfony\Component\DependencyInjection\Container; |
|---|
| 0 | + | use Symfony\Component\Form\FormFactory; |
|---|
| 0 | + | use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension; |
|---|
| 0 | + | |
|---|
| 0 | + | class Scormlib extends Container { |
|---|
| 0 | + | protected $form = null; |
|---|
| 0 | + | static protected $shared = array(); |
|---|
| 0 | + | |
|---|
| 0 | + | public function __construct() { |
|---|
| 0 | + | |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | public function getForm() { |
|---|
| 0 | + | if (isset(self::$shared['form'])) { |
|---|
| 0 | + | return self::$shared['form']; |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | $package = new Package(); |
|---|
| 0 | + | |
|---|
| 0 | + | $form = new ImporterForm(); |
|---|
| 0 | + | |
|---|
| 0 | + | $typeServiceIds = array( |
|---|
| 0 | + | 'field' => 'form.type.field', |
|---|
| 0 | + | 'form' => 'form.type.form', |
|---|
| 0 | + | 'birthday' => 'form.type.birthday', |
|---|
| 0 | + | 'checkbox' => 'form.type.checkbox', |
|---|
| 0 | + | 'choice' => 'form.type.choice', |
|---|
| 0 | + | 'collection' => 'form.type.collection', |
|---|
| 0 | + | 'country' => 'form.type.country', |
|---|
| 0 | + | 'date' => 'form.type.date', |
|---|
| 0 | + | 'datetime' => 'form.type.datetime', |
|---|
| 0 | + | 'email' => 'form.type.email', |
|---|
| 0 | + | 'file' => 'form.type.file', |
|---|
| 0 | + | 'hidden' => 'form.type.hidden', |
|---|
| 0 | + | 'integer' => 'form.type.integer', |
|---|
| 0 | + | 'language' => 'form.type.language', |
|---|
| 0 | + | 'locale' => 'form.type.locale', |
|---|
| 0 | + | 'money' => 'form.type.money', |
|---|
| 0 | + | 'number' => 'form.type.number', |
|---|
| 0 | + | 'password' => 'form.type.password', |
|---|
| 0 | + | 'percent' => 'form.type.percent', |
|---|
| 0 | + | 'radio' => 'form.type.radio', |
|---|
| 0 | + | 'repeated' => 'form.type.repeated', |
|---|
| 0 | + | 'search' => 'form.type.search', |
|---|
| 0 | + | 'textarea' => 'form.type.textarea', |
|---|
| 0 | + | 'text' => 'form.type.text', |
|---|
| 0 | + | 'time' => 'form.type.time', |
|---|
| 0 | + | 'timezone' => 'form.type.timezone', |
|---|
| 0 | + | 'url' => 'form.type.url', |
|---|
| 0 | + | 'csrf' => 'form.type.csrf', |
|---|
| 0 | + | 'entity' => 'form.type.entity'); |
|---|
| 0 | + | $typeExtensionServiceIds = array( |
|---|
| 0 | + | 'field' => array('form.type_extension.field'), |
|---|
| 0 | + | 'form' => array('form.type_extension.csrf')); |
|---|
| 0 | + | $guesserServiceIds = array( |
|---|
| 0 | + | 'form.type_guesser.validator', |
|---|
| 0 | + | 'form.type_guesser.doctrine'); |
|---|
| 0 | + | $extensions = array(new DependencyInjectionExtension($this, |
|---|
| 0 | + | $typeServiceIds, |
|---|
| 0 | + | $typeExtensionServiceIds, |
|---|
| 0 | + | $guesserServiceIds)); |
|---|
| 0 | + | $ff = new FormFactory($extensions); |
|---|
| 0 | + | $form = $ff->create($form, $package); |
|---|
| 0 | + | |
|---|
| 0 | + | self::$shared['form'] = $form; |
|---|
| 0 | + | |
|---|
| 0 | + | return $form; |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | public function renderForm() { |
|---|
| 0 | + | return $this->getForm()->createView(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.csrf_provider' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Csrf\CsrfProvider\SessionCsrfProvider A Symfony\Component\Form\Extension\Csrf\CsrfProvider\SessionCsrfProvider instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_CsrfProviderService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.csrf_provider'] = new \Symfony\Component\Form\Extension\Csrf\CsrfProvider\SessionCsrfProvider($this->get('session'), '8a0328519e6923ae8045fce2ae8921447640dce9'); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.factory' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\FormFactory A Symfony\Component\Form\FormFactory instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_FactoryService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.factory'] = new \Symfony\Component\Form\FormFactory(array(0 => new \Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension($this, array('field' => 'form.type.field', 'form' => 'form.type.form', 'birthday' => 'form.type.birthday', 'checkbox' => 'form.type.checkbox', 'choice' => 'form.type.choice', 'collection' => 'form.type.collection', 'country' => 'form.type.country', 'date' => 'form.type.date', 'datetime' => 'form.type.datetime', 'email' => 'form.type.email', 'file' => 'form.type.file', 'hidden' => 'form.type.hidden', 'integer' => 'form.type.integer', 'language' => 'form.type.language', 'locale' => 'form.type.locale', 'money' => 'form.type.money', 'number' => 'form.type.number', 'password' => 'form.type.password', 'percent' => 'form.type.percent', 'radio' => 'form.type.radio', 'repeated' => 'form.type.repeated', 'search' => 'form.type.search', 'textarea' => 'form.type.textarea', 'text' => 'form.type.text', 'time' => 'form.type.time', 'timezone' => 'form.type.timezone', 'url' => 'form.type.url', 'csrf' => 'form.type.csrf', 'entity' => 'form.type.entity'), array('field' => array(0 => 'form.type_extension.field'), 'form' => array(0 => 'form.type_extension.csrf')), array(0 => 'form.type_guesser.validator', 1 => 'form.type_guesser.doctrine')))); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.birthday' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\BirthdayType A Symfony\Component\Form\Extension\Core\Type\BirthdayType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_BirthdayService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.birthday'] = new \Symfony\Component\Form\Extension\Core\Type\BirthdayType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.checkbox' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\CheckboxType A Symfony\Component\Form\Extension\Core\Type\CheckboxType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_CheckboxService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.checkbox'] = new \Symfony\Component\Form\Extension\Core\Type\CheckboxType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.choice' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\ChoiceType A Symfony\Component\Form\Extension\Core\Type\ChoiceType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_ChoiceService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.choice'] = new \Symfony\Component\Form\Extension\Core\Type\ChoiceType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.collection' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\CollectionType A Symfony\Component\Form\Extension\Core\Type\CollectionType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_CollectionService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.collection'] = new \Symfony\Component\Form\Extension\Core\Type\CollectionType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.country' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\CountryType A Symfony\Component\Form\Extension\Core\Type\CountryType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_CountryService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.country'] = new \Symfony\Component\Form\Extension\Core\Type\CountryType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.csrf' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Csrf\Type\CsrfType A Symfony\Component\Form\Extension\Csrf\Type\CsrfType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_CsrfService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.csrf'] = new \Symfony\Component\Form\Extension\Csrf\Type\CsrfType($this->get('form.csrf_provider')); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.date' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\DateType A Symfony\Component\Form\Extension\Core\Type\DateType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_DateService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.date'] = new \Symfony\Component\Form\Extension\Core\Type\DateType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.datetime' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\DateTimeType A Symfony\Component\Form\Extension\Core\Type\DateTimeType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_DatetimeService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.datetime'] = new \Symfony\Component\Form\Extension\Core\Type\DateTimeType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.email' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\EmailType A Symfony\Component\Form\Extension\Core\Type\EmailType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_EmailService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.email'] = new \Symfony\Component\Form\Extension\Core\Type\EmailType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.entity' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Bridge\Doctrine\Form\Type\EntityType A Symfony\Bridge\Doctrine\Form\Type\EntityType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_EntityService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.entity'] = new \Symfony\Bridge\Doctrine\Form\Type\EntityType($this->get('doctrine')); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.field' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\FieldType A Symfony\Component\Form\Extension\Core\Type\FieldType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_FieldService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.field'] = new \Symfony\Component\Form\Extension\Core\Type\FieldType($this->get('validator')); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.file' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\FileType A Symfony\Component\Form\Extension\Core\Type\FileType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_FileService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.file'] = new \Symfony\Component\Form\Extension\Core\Type\FileType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.form' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\FormType A Symfony\Component\Form\Extension\Core\Type\FormType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_FormService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.form'] = new \Symfony\Component\Form\Extension\Core\Type\FormType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.hidden' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\HiddenType A Symfony\Component\Form\Extension\Core\Type\HiddenType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_HiddenService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.hidden'] = new \Symfony\Component\Form\Extension\Core\Type\HiddenType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.integer' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\IntegerType A Symfony\Component\Form\Extension\Core\Type\IntegerType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_IntegerService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.integer'] = new \Symfony\Component\Form\Extension\Core\Type\IntegerType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.language' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\LanguageType A Symfony\Component\Form\Extension\Core\Type\LanguageType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_LanguageService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.language'] = new \Symfony\Component\Form\Extension\Core\Type\LanguageType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.locale' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\LocaleType A Symfony\Component\Form\Extension\Core\Type\LocaleType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_LocaleService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.locale'] = new \Symfony\Component\Form\Extension\Core\Type\LocaleType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.money' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\MoneyType A Symfony\Component\Form\Extension\Core\Type\MoneyType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_MoneyService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.money'] = new \Symfony\Component\Form\Extension\Core\Type\MoneyType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.number' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\NumberType A Symfony\Component\Form\Extension\Core\Type\NumberType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_NumberService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.number'] = new \Symfony\Component\Form\Extension\Core\Type\NumberType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.password' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\PasswordType A Symfony\Component\Form\Extension\Core\Type\PasswordType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_PasswordService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.password'] = new \Symfony\Component\Form\Extension\Core\Type\PasswordType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.percent' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\PercentType A Symfony\Component\Form\Extension\Core\Type\PercentType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_PercentService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.percent'] = new \Symfony\Component\Form\Extension\Core\Type\PercentType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.radio' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\RadioType A Symfony\Component\Form\Extension\Core\Type\RadioType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_RadioService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.radio'] = new \Symfony\Component\Form\Extension\Core\Type\RadioType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.repeated' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\RepeatedType A Symfony\Component\Form\Extension\Core\Type\RepeatedType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_RepeatedService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.repeated'] = new \Symfony\Component\Form\Extension\Core\Type\RepeatedType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.search' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\SearchType A Symfony\Component\Form\Extension\Core\Type\SearchType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_SearchService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.search'] = new \Symfony\Component\Form\Extension\Core\Type\SearchType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.text' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\TextType A Symfony\Component\Form\Extension\Core\Type\TextType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_TextService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.text'] = new \Symfony\Component\Form\Extension\Core\Type\TextType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.textarea' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\TextareaType A Symfony\Component\Form\Extension\Core\Type\TextareaType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_TextareaService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.textarea'] = new \Symfony\Component\Form\Extension\Core\Type\TextareaType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.time' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\TimeType A Symfony\Component\Form\Extension\Core\Type\TimeType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_TimeService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.time'] = new \Symfony\Component\Form\Extension\Core\Type\TimeType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.timezone' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\TimezoneType A Symfony\Component\Form\Extension\Core\Type\TimezoneType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_TimezoneService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.timezone'] = new \Symfony\Component\Form\Extension\Core\Type\TimezoneType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type.url' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Core\Type\UrlType A Symfony\Component\Form\Extension\Core\Type\UrlType instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_Type_UrlService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type.url'] = new \Symfony\Component\Form\Extension\Core\Type\UrlType(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type_extension.csrf' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension A Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_TypeExtension_CsrfService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type_extension.csrf'] = new \Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension(true, '_token'); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'form.type_extension.field' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Form\Extension\Validator\Type\FieldTypeValidatorExtension A Symfony\Component\Form\Extension\Validator\Type\FieldTypeValidatorExtension instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getForm_TypeExtension_FieldService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['form.type_extension.field'] = new \Symfony\Component\Form\Extension\Validator\Type\FieldTypeValidatorExtension($this->get('validator')); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'validator' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Validator\Validator A Symfony\Component\Validator\Validator instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getValidatorService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['validator'] = new \Symfony\Component\Validator\Validator($this->get('validator.mapping.class_metadata_factory'), new \Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory($this, array('doctrine.orm.validator.unique' => 'doctrine.orm.validator.unique'))); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'validator.mapping.class_metadata_factory' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is private. |
|---|
| 0 | + | * If you want to be able to request this service from the container directly, |
|---|
| 0 | + | * make it public, otherwise you might end up with broken code. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\Validator\Mapping\ClassMetadataFactory A Symfony\Component\Validator\Mapping\ClassMetadataFactory instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getValidator_Mapping_ClassMetadataFactoryService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['validator.mapping.class_metadata_factory'] = new \Symfony\Component\Validator\Mapping\ClassMetadataFactory(new \Symfony\Component\Validator\Mapping\Loader\LoaderChain(array(0 => new \Symfony\Component\Validator\Mapping\Loader\AnnotationLoader($this->get('annotation_reader')), 1 => new \Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader(), 2 => new \Symfony\Component\Validator\Mapping\Loader\XmlFilesLoader(array(0 => '/Users/goulwen/Dev/php/Symfony2/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/../../../Component/Form/Resources/config/validation.xml')), 3 => new \Symfony\Component\Validator\Mapping\Loader\YamlFilesLoader(array()))), NULL); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'annotation_reader' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Doctrine\Common\Annotations\FileCacheReader A Doctrine\Common\Annotations\FileCacheReader instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getAnnotationReaderService() |
|---|
| 0 | + | { |
|---|
| 0 | + | $a = new \Doctrine\Common\Annotations\AnnotationReader(); |
|---|
| 0 | + | $a->setAutoloadAnnotations(true); |
|---|
| 0 | + | |
|---|
| 0 | + | return $this->services['annotation_reader'] = new \Doctrine\Common\Annotations\FileCacheReader($a, '/Users/goulwen/Dev/php/Symfony2/app/cache/dev/annotations', true); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'session' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\HttpFoundation\Session A Symfony\Component\HttpFoundation\Session instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getSessionService() |
|---|
| 0 | + | { |
|---|
| 0 | + | $this->services['session'] = $instance = new \Symfony\Component\HttpFoundation\Session($this->get('session.storage'), 'en'); |
|---|
| 0 | + | |
|---|
| 0 | + | $instance->start(); |
|---|
| 0 | + | |
|---|
| 0 | + | return $instance; |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | /** |
|---|
| 0 | + | * Gets the 'session.storage' service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * This service is shared. |
|---|
| 0 | + | * This method always returns the same instance of the service. |
|---|
| 0 | + | * |
|---|
| 0 | + | * @return Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage A Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage instance. |
|---|
| 0 | + | */ |
|---|
| 0 | + | protected function getSession_StorageService() |
|---|
| 0 | + | { |
|---|
| 0 | + | return $this->services['session.storage'] = new \Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage(array()); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | } |
|---|
| ... | |
|---|