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

Extracts a ContentInfo object from $row.
public extractContentInfoFromRow ( array $row, string $prefix = '', string $treePrefix = 'ezcontentobject_tree_' ) : eZ\Publish\SPI\Persistence\Content\ContentInfo
$row array
$prefix string Prefix for row keys, which are initially mapped by ezcontentobject fields
$treePrefix string Prefix for tree row key, which are initially mapped by ezcontentobject_tree_ fields
Результат eZ\Publish\SPI\Persistence\Content\ContentInfo
Пример #1
0
 /**
  * @covers eZ\Publish\Core\Persistence\Legacy\Content\Mapper::extractContentInfoFromRow
  * @dataProvider extractContentInfoFromRowProvider
  *
  * @param array $fixtures
  * @param string $prefix
  */
 public function testExtractContentInfoFromRow(array $fixtures, $prefix)
 {
     $contentInfoReference = $this->getContentExtractReference()->versionInfo->contentInfo;
     $mapper = new Mapper($this->getValueConverterRegistryMock(), $this->getLanguageHandler());
     self::assertEquals($contentInfoReference, $mapper->extractContentInfoFromRow($fixtures, $prefix));
 }
Пример #2
0
 /**
  * Returns the metadata object for a content identified by $contentId.
  *
  * @param int|string $contentId
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo
  */
 public function loadContentInfo($contentId)
 {
     return $this->contentMapper->extractContentInfoFromRow($this->contentGateway->loadContentInfo($contentId));
 }
Пример #3
0
 /**
  * Returns the metadata object for a content identified by $remoteId.
  *
  * @param mixed $remoteId
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo
  */
 public function loadContentInfoByRemoteId($remoteId)
 {
     return $this->mapper->extractContentInfoFromRow($this->contentGateway->loadContentInfoByRemoteId($remoteId));
 }