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 |
/** * @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)); }
/** * 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)); }
/** * 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)); }