public function getReferencedFiles(array $fieldIds, $versionNo)
{
if (empty($fieldIds)) {
return array();
}
$connection = $this->getConnection();
$selectQuery = $connection->createSelectQuery();
$selectQuery->select($connection->quoteColumn('filename'), $connection->quoteColumn('mime_type'))->from($connection->quoteTable($this->getStorageTable()))->where($selectQuery->expr->lAnd($selectQuery->expr->in($connection->quoteColumn('contentobject_attribute_id'), $fieldIds), $selectQuery->expr->eq($connection->quoteColumn('version'), $selectQuery->bindValue($versionNo, null, \PDO::PARAM_INT))));
$statement = $selectQuery->prepare();
$statement->execute();
$gateway = $this;
return array_map(function ($row) use($gateway) {
return $gateway->prependMimeToPath($row['filename'], $row['mime_type']);
}, $statement->fetchAll(\PDO::FETCH_ASSOC));
}