src/Kunstmaan/NodeBundle/Repository/NodeTranslationRepository.php
public function getNodeTranslationForSlug(
        $slug,
        NodeTranslation $parentNode = null
    ) {
        if (empty($slug)) {
            return $this->getNodeTranslationForSlugPart(null, $slug);
        }

        $slugParts = explode('/', $slug);
        $result = $parentNode;
        foreach ($slugParts as $slugPart) {
            $result = $this->getNodeTranslationForSlugPart($result, $slugPart);
        }

        return $result;
    }
public function getNodeTranslationForSlug(
        $slug,
        NodeTranslation $parentNode = null
    ) {
        if (empty($slug)) {
            return $this->getNodeTranslationForSlugPart(null, $slug);
        }

        $slugParts = explode('/', $slug);
        $result = $parentNode;
        foreach ($slugParts as $slugPart) {
            $result = $this->getNodeTranslationForSlugPart($result, $slugPart);
        }

        return $result;
    }
public function getNodeTranslationForSlug ( $ slug , NodeTranslation $ parentNode = null ) { if ( empty ( $ slug ) ) { return $ this -> getNodeTranslationForSlugPart ( null , $ slug ) ; } $ slugParts = explode ( '/' , $ slug ) ; $ result = $ parentNode ; foreach ( $ slugParts as $ slugPart ) { $ result = $ this -> getNodeTranslationForSlugPart ( $ result , $ slugPart ) ; } return $ result ; }
Get the node translation for a given slug string

@param string               $slug       The slug
@param NodeTranslation|null $parentNode The parentnode

@return NodeTranslation|null
Get the node translation for a given slug string