Article
This model defines a generic article page.
Classname
Photon\CmsEngine\Model\Element\Article
Attributes
Attribute | Type | Description |
---|---|---|
$image | Image | Featured image of the article |
$title | string | Title of the article |
$subTitle | string | Subtitle of the article |
$summary | string | A brief summary of the article |
$body | string | Rich text content that makes up the body of the article |
$meta | array | Array of metadata on this article |
$supplements | array | Array of supplements associated with this article |
$passwordProtected | boolean | Whether this content is password protected |
$restricted | boolean | Whether access to this content is restricted |
$navigation | array | Array of navigation links |
$pagination | array | Array of pagination links |
$link | Link | Link to this article |
<?php
use Photon\CmsEngine\Model\Element\Article;
$article = new Article();
$article->setTitle($item->getTitle());
$article->setSummary($item->getSummary());
$article->setBody($item->getDescription());
$article->setImage($item->getImage());
$article->addMeta(
$this->getTranslatedString('date-label'),
$this->getMetaElement(
$this->getTranslatedString('date-label'),
$item->getEventDate(),
'string'
)
);