src/Kunstmaan/NodeSearchBundle/Helper/IndexablePagePartsService.php
public function getIndexablePageParts(HasPagePartsInterface $page, $context = 'main')
    {
        $contexts = array_unique(array_merge($this->contexts, [$context]));

        $indexablePageParts = [];
        foreach ($contexts as $context) {
            $pageParts = $this->em
                ->getRepository('KunstmaanPagePartBundle:PagePartRef')
                ->getPageParts($page, $context);

            foreach ($pageParts as $pagePart) {
                if ($pagePart instanceof IndexableInterface && !$pagePart->isIndexable()) {
                    continue;
                }
                $indexablePageParts[] = $pagePart;
            }
        }

        return $indexablePageParts;
    }
public function getIndexablePageParts(HasPagePartsInterface $page, $context = 'main')
    {
        $contexts = array_unique(array_merge($this->contexts, [$context]));

        $indexablePageParts = [];
        foreach ($contexts as $context) {
            $pageParts = $this->em
                ->getRepository('KunstmaanPagePartBundle:PagePartRef')
                ->getPageParts($page, $context);

            foreach ($pageParts as $pagePart) {
                if ($pagePart instanceof IndexableInterface && !$pagePart->isIndexable()) {
                    continue;
                }
                $indexablePageParts[] = $pagePart;
            }
        }

        return $indexablePageParts;
    }
public function getIndexablePageParts ( HasPagePartsInterface $ page , $ context = 'main' ) { $ contexts = array_unique ( array_merge ( $ this -> contexts , [ $ context ] ) ) ; $ indexablePageParts = [ ] ; foreach ( $ contexts as $ context ) { $ pageParts = $ this -> em -> getRepository ( 'KunstmaanPagePartBundle:PagePartRef' ) -> getPageParts ( $ page , $ context ) ; foreach ( $ pageParts as $ pagePart ) { if ( $ pagePart instanceof IndexableInterface && ! $ pagePart -> isIndexable ( ) ) { continue ; } $ indexablePageParts [ ] = $ pagePart ; } } return $ indexablePageParts ; }
Returns all indexable pageparts for the specified page and context

@param HasPagePartsInterface $page
@param string                $context

@return array
Returns all indexable pageparts for the specified page and context