src/Admin/AdminHelper.php
protected function getEntityClassName(AdminInterface $admin, $elements)
    {
        $element = array_shift($elements);
        $associationAdmin = $admin->getFormFieldDescription($element)->getAssociationAdmin();
        if (0 === \count($elements)) {
            return $associationAdmin->getClass();
        }

        return $this->getEntityClassName($associationAdmin, $elements);
    }
protected function getEntityClassName(AdminInterface $admin, $elements)
    {
        $element = array_shift($elements);
        $associationAdmin = $admin->getFormFieldDescription($element)->getAssociationAdmin();
        if (0 === \count($elements)) {
            return $associationAdmin->getClass();
        }

        return $this->getEntityClassName($associationAdmin, $elements);
    }
protected function getEntityClassName ( AdminInterface $ admin , $ elements ) { $ element = array_shift ( $ elements ) ; $ associationAdmin = $ admin -> getFormFieldDescription ( $ element ) -> getAssociationAdmin ( ) ; if ( 0 === \ count ( $ elements ) ) { return $ associationAdmin -> getClass ( ) ; } return $ this -> getEntityClassName ( $ associationAdmin , $ elements ) ; }
Recursively find the class name of the admin responsible for the element at the end of an association chain.

@param array $elements

@return string
Recursively find the class name of the admin responsible for the element at the end of an association chain .