Skip to main content

Article

This model defines a generic article page.

Classname

Photon\CmsEngine\Model\Element\Article

Attributes

AttributeTypeDescription
$imageImageFeatured image of the article
$titlestringTitle of the article
$subTitlestringSubtitle of the article
$summarystringA brief summary of the article
$bodystringRich text content that makes up the body of the article
$metaarrayArray of metadata on this article
$supplementsarrayArray of supplements associated with this article
$passwordProtectedbooleanWhether this content is password protected
$restrictedbooleanWhether access to this content is restricted
$navigationarrayArray of navigation links
$paginationarrayArray of pagination links
$linkLinkLink 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'
)
);