Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

RichText/RichTextStorage/Gateway/LegacyStorage.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway;
8
9 use eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway;
10 use eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway as UrlGateway;
11 use eZ\Publish\Core\Persistence\Database\DatabaseHandler;
12
16 class LegacyStorage extends Gateway
17 {
19 protected $dbHandler;
20
21 public function __construct(UrlGateway $urlGateway, DatabaseHandler $dbHandler)
22 {
23 @trigger_error(
24 sprintf('%s is deprecated, use %s instead', self::class, DoctrineStorage::class),
25 E_USER_DEPRECATED
26 );
27 parent::__construct($urlGateway);
28 $this->dbHandler = $dbHandler;
29 }
30
36 protected function getConnection()
37 {
38 return $this->dbHandler;
39 }
40
50 public function getContentIds(array $remoteIds)
51 {
52 $objectRemoteIdMap = [];
53
54 if (!empty($remoteIds)) {
55 $q = $this->getConnection()->createSelectQuery();
56 $q
57 ->select('id', 'remote_id')
58 ->from('ezcontentobject')
59 ->where($q->expr->in('remote_id', $remoteIds));
60
61 $statement = $q->prepare();
62 $statement->execute();
63 foreach ($statement->fetchAll(\PDO::FETCH_ASSOC) as $row) {
64 $objectRemoteIdMap[$row['remote_id']] = $row['id'];
65 }
66 }
67
68 return $objectRemoteIdMap;
69 }
70 }
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\LegacyStorage
Definition: RichText/RichTextStorage/Gateway/LegacyStorage.php:17
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\LegacyStorage\__construct
__construct(UrlGateway $urlGateway, DatabaseHandler $dbHandler)
Definition: RichText/RichTextStorage/Gateway/LegacyStorage.php:21
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\LegacyStorage\getContentIds
getContentIds(array $remoteIds)
Returns a list of Content ids for a list of remote ids.
Definition: RichText/RichTextStorage/Gateway/LegacyStorage.php:50
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\LegacyStorage\getConnection
getConnection()
Returns the active connection.
Definition: RichText/RichTextStorage/Gateway/LegacyStorage.php:36
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\LegacyStorage\$dbHandler
$dbHandler
Definition: RichText/RichTextStorage/Gateway/LegacyStorage.php:19
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway
Abstract gateway class for RichText type.
Definition: FieldType/RichText/RichTextStorage/Gateway.php:19
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway\$urlGateway
$urlGateway
Definition: FieldType/RichText/RichTextStorage/Gateway.php:21
eZ\Publish\Core\Persistence\Database\DatabaseHandler
Interface for relational database abstractions supported by eZ.
Definition: DatabaseHandler.php:18
eZ\Publish\Core\FieldType\RichText\RichTextStorage\Gateway
Definition: RichText/RichTextStorage/Gateway/DoctrineStorage.php:7
eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway
Definition: Url/UrlStorage/Gateway/DoctrineStorage.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.