extractContentInfoFromRow() public method

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
return 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));
 }