eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway\LegacyStorage::getXmlForImages PHP Метод

getXmlForImages() публичный Метод

Returns a the XML content stored for the given $fieldIds.
public getXmlForImages ( integer $versionNo, array $fieldIds ) : array
$versionNo integer
$fieldIds array
Результат array
    public function getXmlForImages($versionNo, array $fieldIds)
    {
        $connection = $this->getConnection();
        $selectQuery = $connection->createSelectQuery();
        $selectQuery->select($connection->quoteColumn('id', 'ezcontentobject_attribute'), $connection->quoteColumn('data_text', 'ezcontentobject_attribute'))->from($connection->quoteTable('ezcontentobject_attribute'))->where($selectQuery->expr->lAnd($selectQuery->expr->eq($connection->quoteColumn('version', 'ezcontentobject_attribute'), $selectQuery->bindValue($versionNo, null, \PDO::PARAM_INT)), $selectQuery->expr->in($connection->quoteColumn('id', 'ezcontentobject_attribute'), $fieldIds)));
        $statement = $selectQuery->prepare();
        $statement->execute();
        $fieldLookup = array();
        foreach ($statement->fetchAll(\PDO::FETCH_ASSOC) as $row) {
            $fieldLookup[$row['id']] = $row['data_text'];
        }
        return $fieldLookup;
    }