src/Kunstmaan/NodeBundle/Helper/NodeMenuItem.php
public function getChildOfClass($class)
    {
        // Check for namespace alias
        if (strpos($class, ':') !== false) {
            list($namespaceAlias, $simpleClassName) = explode(':', $class);
            $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        foreach ($this->getChildren() as $child) {
            if ($child->getPage() instanceof $class) {
                return $child;
            }
        }

        return null;
    }
public function getChildOfClass($class)
    {
        // Check for namespace alias
        if (strpos($class, ':') !== false) {
            list($namespaceAlias, $simpleClassName) = explode(':', $class);
            $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        foreach ($this->getChildren() as $child) {
            if ($child->getPage() instanceof $class) {
                return $child;
            }
        }

        return null;
    }
public function getChildOfClass ( $ class ) { // Check for namespace alias if ( strpos ( $ class , ':' ) !== false ) { list ( $ namespaceAlias , $ simpleClassName ) = explode ( ':' , $ class ) ; $ class = $ this -> em -> getConfiguration ( ) -> getEntityNamespace ( $ namespaceAlias ) . '\\' . $ simpleClassName ; } foreach ( $ this -> getChildren ( ) as $ child ) { if ( $ child -> getPage ( ) instanceof $ class ) { return $ child ; } } return null ; }
Get the first child of class, this is not using the getChildrenOfClass method for performance reasons

@param string $class

@return NodeMenuItem
Get the first child of class this is not using the getChildrenOfClass method for performance reasons