Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Warning: Illegal offset type in isset or empty in/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php line 180 #11188

Copy link
Copy link
Closed
@cesarve77

Description

@cesarve77
Issue body actions
/**
     * {@inheritdoc}
     *
     * @throws \InvalidArgumentException
     */
    public function getManager($name = null)
    {
        if (null === $name) {
            $name = $this->defaultManager;
        }
//line 181
        if (!isset($this->managers[$name])) {
            throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name));
        }

        return $this->getService($this->managers[$name]);
    }

for any reason the name is a object, this happen when I´m trying to overwrite a form type.
example:

class AddressType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('country', 'chained_select', array('mapped' => false, 'class' => 'cesarve77\\ChainedSelectBundle\\Entity\\Country'));
        $builder->add('state', 'chained_select', array('mapped' => false,'class' => 'cesarve77\\ChainedSelectBundle\\Entity\\State'));
        $builder->add('city', 'chained_select', array('mapped' => true, 'class' => 'cesarve77\\ChainedSelectBundle\\Entity\\City'));
        $builder
            ->add('address');
    }

custom type chained_select

class ChainedSelectType extends AbstractType
{


    public function buildForm(FormBuilderInterface $builder, array $options)
    {
       $builder->addEventSubscriber(new AddChainedSelectSubscriber());
    }

in subscriber:

 public function preSetData(FormEvent $event)
    {

        $form = $event->getForm();
        $data=$event->getData();
// custom logic for change the $options
        $form->add($form->getConfig()->getName(),'entity',$options);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.