src/Zicht/Bundle/AdminBundle/Service/Quicklist.php
private function getFirstAdminPerClass($class)
    {
        $code = null;
        $admins = $this->adminPool->getAdminClasses();

        foreach ($admins as $key => $value) {
            if ($key === $class) {
                $code = current($value);
                break;
            }
        }

        return $code === null ?
            $this->adminPool->getAdminByClass($class) : $this->adminPool->getAdminByAdminCode($code);
    }
private function getFirstAdminPerClass($class)
    {
        $code = null;
        $admins = $this->adminPool->getAdminClasses();

        foreach ($admins as $key => $value) {
            if ($key === $class) {
                $code = current($value);
                break;
            }
        }

        return $code === null ?
            $this->adminPool->getAdminByClass($class) : $this->adminPool->getAdminByAdminCode($code);
    }
private function getFirstAdminPerClass ( $ class ) { $ code = null ; $ admins = $ this -> adminPool -> getAdminClasses ( ) ; foreach ( $ admins as $ key => $ value ) { if ( $ key === $ class ) { $ code = current ( $ value ) ; break ; } } return $ code === null ? $ this -> adminPool -> getAdminByClass ( $ class ) : $ this -> adminPool -> getAdminByAdminCode ( $ code ) ; }
Gets the first admin when there are multiple definitions.

@param string  $class
@return null|\Sonata\AdminBundle\Admin\AdminInterface
Gets the first admin when there are multiple definitions .