loadContentInfo() 추상적인 공개 메소드

Will basically return a hash containing all field values for ezcontentobject table plus following keys: - always_available => Boolean indicating if content's language mask contains alwaysAvailable bit field - main_language_code => Language code for main (initial) language. E.g. "eng-GB".
abstract public loadContentInfo ( integer $contentId ) : array
$contentId integer
리턴 array
 /**
  * Loads info for content identified by $contentId.
  * Will basically return a hash containing all field values for ezcontentobject table plus following keys:
  *  - always_available => Boolean indicating if content's language mask contains alwaysAvailable bit field
  *  - main_language_code => Language code for main (initial) language. E.g. "eng-GB"
  *
  * @param int $contentId
  *
  * @throws \eZ\Publish\Core\Base\Exceptions\NotFoundException
  *
  * @return array
  */
 public function loadContentInfo($contentId)
 {
     try {
         return $this->innerGateway->loadContentInfo($contentId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
예제 #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));
 }