Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If only one subclasses is set, it will never be active according to the default code in Sonata\AdminBundle\Admin #1945

Closed
ima-tech opened this issue Feb 4, 2014 · 1 comment

Comments

@ima-tech
Copy link

ima-tech commented Feb 4, 2014

I was looking through Sonata Admin code and I was having problems to use subclasses. I found out that in " Sonata\AdminBundle\Admin ", the code is the following :

    public function hasActiveSubClass()
    {
        if (count($this->subClasses) > 1 && $this->request) {
            return null !== $this->getRequest()->query->get('subclass');
        }

        return false;
    } 

In my opinion, it should be bigger or equal than 1 or bigger than 0. If not, it means that an Admin class can only be subclassed by more than one subclass.

@michelsalib
Copy link

Can you open a PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants