public function getDataFor($arrIds)
    {
        $statement = $this->connection->createQueryBuilder()
            ->select('*')
            ->from('tl_metamodel_rating')
            ->andWhere('mid=:mid AND aid=:aid AND iid IN (:iids)')
            ->setParameter('mid', $this->getMetaModel()->get('id'))
            ->setParameter('aid', $this->get('id'))
            ->setParameter('iids', $arrIds, Connection::PARAM_STR_ARRAY)
            ->execute();

        $arrResult = [];
        while ($objData = $statement->fetch(\PDO::FETCH_OBJ)) {
            $arrResult[$objData->iid] = [
                'votecount' => (int) $objData->votecount,
                'meanvalue' => (float) $objData->meanvalue,
            ];
        }
        foreach (\array_diff($arrIds, \array_keys($arrResult)) as $intId) {
            $arrResult[$intId] = [
                'votecount' => 0,
                'meanvalue' => 0,
            ];
        }

        return $arrResult;
    }
public function getDataFor($arrIds)
    {
        $statement = $this->connection->createQueryBuilder()
            ->select('*')
            ->from('tl_metamodel_rating')
            ->andWhere('mid=:mid AND aid=:aid AND iid IN (:iids)')
            ->setParameter('mid', $this->getMetaModel()->get('id'))
            ->setParameter('aid', $this->get('id'))
            ->setParameter('iids', $arrIds, Connection::PARAM_STR_ARRAY)
            ->execute();

        $arrResult = [];
        while ($objData = $statement->fetch(\PDO::FETCH_OBJ)) {
            $arrResult[$objData->iid] = [
                'votecount' => (int) $objData->votecount,
                'meanvalue' => (float) $objData->meanvalue,
            ];
        }
        foreach (\array_diff($arrIds, \array_keys($arrResult)) as $intId) {
            $arrResult[$intId] = [
                'votecount' => 0,
                'meanvalue' => 0,
            ];
        }

        return $arrResult;
    }
public function getDataFor ( $ arrIds ) { $ statement = $ this -> connection -> createQueryBuilder ( ) -> select ( '*' ) -> from ( 'tl_metamodel_rating' ) -> andWhere ( 'mid=:mid AND aid=:aid AND iid IN (:iids)' ) -> setParameter ( 'mid' , $ this -> getMetaModel ( ) -> get ( 'id' ) ) -> setParameter ( 'aid' , $ this -> get ( 'id' ) ) -> setParameter ( 'iids' , $ arrIds , Connection :: PARAM_STR_ARRAY ) -> execute ( ) ; $ arrResult = [ ] ; while ( $ objData = $ statement -> fetch ( \ PDO :: FETCH_OBJ ) ) { $ arrResult [ $ objData -> iid ] = [ 'votecount' => ( int ) $ objData -> votecount , 'meanvalue' => ( float ) $ objData -> meanvalue , ] ; } foreach ( \ array_diff ( $ arrIds , \ array_keys ( $ arrResult ) ) as $ intId ) { $ arrResult [ $ intId ] = [ 'votecount' => 0 , 'meanvalue' => 0 , ] ; } return $ arrResult ; }
This method is called to retrieve the data for certain items from the database.

@param int[] $arrIds The ids of the items to retrieve.

@return mixed[] The nature of the resulting array is a mapping from id => "native data" where
the definition of "native data" is only of relevance to the given item.
This method is called to retrieve the data for certain items from the database .