eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\LegacyStorage::getContentIds PHP Method

getContentIds() public method

Non-existent ids are ignored.
public getContentIds ( array $remoteIds ) : array
$remoteIds array An array of Content remote ids
return array An array of Content ids, with remote ids as keys
    public function getContentIds(array $remoteIds)
    {
        $objectRemoteIdMap = array();
        if (!empty($remoteIds)) {
            $q = $this->getConnection()->createSelectQuery();
            $q->select('id', 'remote_id')->from('ezcontentobject')->where($q->expr->in('remote_id', $remoteIds));
            $statement = $q->prepare();
            $statement->execute();
            foreach ($statement->fetchAll(\PDO::FETCH_ASSOC) as $row) {
                $objectRemoteIdMap[$row['remote_id']] = $row['id'];
            }
        }
        return $objectRemoteIdMap;
    }