public function getDescendantsContentUids($contents)
    {
        if (false === is_array($contents)) {
            $contents = array($contents);
        }

        $meta = $this->_em->getClassMetadata('BackBee\ClassContent\Indexes\IdxContentContent');

        $q = $this->_em->getConnection()
                ->createQueryBuilder()
                ->select('c.'.$meta->getColumnName('subcontent_uid'))
                ->from($meta->getTableName(), 'c');

        $index = 0;
        $atleastone = false;
        foreach ($contents as $content) {
            if (false === ($content instanceof AbstractClassContent)) {
                continue;
            }

            if (true === $content->isElementContent()) {
                continue;
            }

            $q->orWhere('c.'.$meta->getColumnName('content_uid').' = :uid'.$index)
                    ->setParameter('uid'.$index, $content->getUid());

            $index++;
            $atleastone = true;
        }

        return (true === $atleastone) ? array_unique($q->execute()->fetchAll(\PDO::FETCH_COLUMN)) : array();
    }
public function getDescendantsContentUids($contents)
    {
        if (false === is_array($contents)) {
            $contents = array($contents);
        }

        $meta = $this->_em->getClassMetadata('BackBee\ClassContent\Indexes\IdxContentContent');

        $q = $this->_em->getConnection()
                ->createQueryBuilder()
                ->select('c.'.$meta->getColumnName('subcontent_uid'))
                ->from($meta->getTableName(), 'c');

        $index = 0;
        $atleastone = false;
        foreach ($contents as $content) {
            if (false === ($content instanceof AbstractClassContent)) {
                continue;
            }

            if (true === $content->isElementContent()) {
                continue;
            }

            $q->orWhere('c.'.$meta->getColumnName('content_uid').' = :uid'.$index)
                    ->setParameter('uid'.$index, $content->getUid());

            $index++;
            $atleastone = true;
        }

        return (true === $atleastone) ? array_unique($q->execute()->fetchAll(\PDO::FETCH_COLUMN)) : array();
    }
public function getDescendantsContentUids ( $ contents ) { if ( false === is_array ( $ contents ) ) { $ contents = array ( $ contents ) ; } $ meta = $ this -> _em -> getClassMetadata ( 'BackBee\ClassContent\Indexes\IdxContentContent' ) ; $ q = $ this -> _em -> getConnection ( ) -> createQueryBuilder ( ) -> select ( 'c.' . $ meta -> getColumnName ( 'subcontent_uid' ) ) -> from ( $ meta -> getTableName ( ) , 'c' ) ; $ index = 0 ; $ atleastone = false ; foreach ( $ contents as $ content ) { if ( false === ( $ content instanceof AbstractClassContent ) ) { continue ; } if ( true === $ content -> isElementContent ( ) ) { continue ; } $ q -> orWhere ( 'c.' . $ meta -> getColumnName ( 'content_uid' ) . ' = :uid' . $ index ) -> setParameter ( 'uid' . $ index , $ content -> getUid ( ) ) ; $ index ++ ; $ atleastone = true ; } return ( true === $ atleastone ) ? array_unique ( $ q -> execute ( ) -> fetchAll ( \ PDO :: FETCH_COLUMN ) ) : array ( ) ; }
Returns an array of content uids owned by provided contents.

@param mixed $contents

@return array
Returns an array of content uids owned by provided contents .