public function getAttachedContentElements($newsRecord)
    {
        $queryBuilder = Db::getQueryBuilder('tt_content');
        $res = $queryBuilder
            ->select('*')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'tx_news_related_news',
                    $queryBuilder->createNamedParameter($newsRecord['uid'], \PDO::PARAM_INT)
                )
            )
            ->execute();

        $contentElements = array();
        if ($res->rowCount()) {
            while (($contentElement = $res->fetch())) {
                $contentElements[] = $contentElement;
            }
        }

        return $contentElements;
    }
public function getAttachedContentElements($newsRecord)
    {
        $queryBuilder = Db::getQueryBuilder('tt_content');
        $res = $queryBuilder
            ->select('*')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'tx_news_related_news',
                    $queryBuilder->createNamedParameter($newsRecord['uid'], \PDO::PARAM_INT)
                )
            )
            ->execute();

        $contentElements = array();
        if ($res->rowCount()) {
            while (($contentElement = $res->fetch())) {
                $contentElements[] = $contentElement;
            }
        }

        return $contentElements;
    }
public function getAttachedContentElements ( $ newsRecord ) { $ queryBuilder = Db :: getQueryBuilder ( 'tt_content' ) ; $ res = $ queryBuilder -> select ( '*' ) -> from ( 'tt_content' ) -> where ( $ queryBuilder -> expr ( ) -> eq ( 'tx_news_related_news' , $ queryBuilder -> createNamedParameter ( $ newsRecord [ 'uid' ] , \ PDO :: PARAM_INT ) ) ) -> execute ( ) ; $ contentElements = array ( ) ; if ( $ res -> rowCount ( ) ) { while ( ( $ contentElement = $ res -> fetch ( ) ) ) { $ contentElements [ ] = $ contentElement ; } } return $ contentElements ; }
Fetches related content elements for a given news record.

@author Christian Bülter <buelter@kennziffer.com>
@since 15.10.15
@param array $newsRecord
@return array
Fetches related content elements for a given news record .