<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - articleDate [datetime]
* - highlight [checkbox]
* - bereiche [manyToManyObjectRelation]
* - source [input]
* - sponsor [manyToOneRelation]
* - mastodonLink [input]
* - mastodon [checkbox]
* - title [input]
* - subtitle [input]
* - excerpt [textarea]
* - link [link]
* - content [wysiwyg]
* - image [image]
* - imageHeader [image]
* - imageGallery [imageGallery]
* - podcast [manyToManyObjectRelation]
* - Snippets [manyToManyRelation]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByArticleDate($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByHighlight($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByBereiche($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getBySource($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getBySponsor($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByMastodonLink($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByMastodon($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getBySubtitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByExcerpt($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByContent($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByImage($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByImageHeader($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getByPodcast($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ThemaArtikel\Listing|\Pimcore\Model\DataObject\ThemaArtikel|null getBySnippets($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class ThemaArtikel extends Concrete
{
protected $o_classId = "13";
protected $o_className = "ThemaArtikel";
protected $articleDate;
protected $highlight;
protected $bereiche;
protected $source;
protected $sponsor;
protected $mastodonLink;
protected $mastodon;
protected $title;
protected $subtitle;
protected $excerpt;
protected $link;
protected $content;
protected $image;
protected $imageHeader;
protected $imageGallery;
protected $podcast;
protected $Snippets;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get articleDate - Article Date
* @return \Carbon\Carbon|null
*/
public function getArticleDate(): ?\Carbon\Carbon
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("articleDate");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->articleDate;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set articleDate - Article Date
* @param \Carbon\Carbon|null $articleDate
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setArticleDate(?\Carbon\Carbon $articleDate)
{
$this->articleDate = $articleDate;
return $this;
}
/**
* Get highlight - Highlight
* @return bool|null
*/
public function getHighlight(): ?bool
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("highlight");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->highlight;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set highlight - Highlight
* @param bool|null $highlight
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setHighlight(?bool $highlight)
{
$this->highlight = $highlight;
return $this;
}
/**
* Get bereiche - Bereiche
* @return \Pimcore\Model\DataObject\ThemaBereich[]
*/
public function getBereiche(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("bereiche");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("bereiche")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set bereiche - Bereiche
* @param \Pimcore\Model\DataObject\ThemaBereich[] $bereiche
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setBereiche(?array $bereiche)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("bereiche");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getBereiche();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $bereiche);
if (!$isEqual) {
$this->markFieldDirty("bereiche", true);
}
$this->bereiche = $fd->preSetData($this, $bereiche);
return $this;
}
/**
* Get source - Quelle, Autor
* @return string|null
*/
public function getSource(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("source");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->source;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set source - Quelle, Autor
* @param string|null $source
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setSource(?string $source)
{
$this->source = $source;
return $this;
}
/**
* Get sponsor - Sponsor (Explizit für den Artikel)
* @return \Pimcore\Model\DataObject\ThemaSponsor|null
*/
public function getSponsor(): ?\Pimcore\Model\Element\AbstractElement
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("sponsor");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("sponsor")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set sponsor - Sponsor (Explizit für den Artikel)
* @param \Pimcore\Model\DataObject\ThemaSponsor|null $sponsor
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setSponsor(?\Pimcore\Model\Element\AbstractElement $sponsor)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("sponsor");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getSponsor();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $sponsor);
if (!$isEqual) {
$this->markFieldDirty("sponsor", true);
}
$this->sponsor = $fd->preSetData($this, $sponsor);
return $this;
}
/**
* Get mastodonLink - Mastodon Link
* @return string|null
*/
public function getMastodonLink(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("mastodonLink");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->mastodonLink;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set mastodonLink - Mastodon Link
* @param string|null $mastodonLink
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setMastodonLink(?string $mastodonLink)
{
$this->mastodonLink = $mastodonLink;
return $this;
}
/**
* Get mastodon - Auf Mastodon posten
* @return bool|null
*/
public function getMastodon(): ?bool
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("mastodon");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->mastodon;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set mastodon - Auf Mastodon posten
* @param bool|null $mastodon
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setMastodon(?bool $mastodon)
{
$this->mastodon = $mastodon;
return $this;
}
/**
* Get title - Titel
* @return string|null
*/
public function getTitle(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("title");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->title;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set title - Titel
* @param string|null $title
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setTitle(?string $title)
{
$this->title = $title;
return $this;
}
/**
* Get subtitle - Untertitel
* @return string|null
*/
public function getSubtitle(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("subtitle");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->subtitle;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set subtitle - Untertitel
* @param string|null $subtitle
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setSubtitle(?string $subtitle)
{
$this->subtitle = $subtitle;
return $this;
}
/**
* Get excerpt - Kurzfassung
* @return string|null
*/
public function getExcerpt(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("excerpt");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->excerpt;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set excerpt - Kurzfassung
* @param string|null $excerpt
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setExcerpt(?string $excerpt)
{
$this->excerpt = $excerpt;
return $this;
}
/**
* Get link - Link
* @return \Pimcore\Model\DataObject\Data\Link|null
*/
public function getLink(): ?\Pimcore\Model\DataObject\Data\Link
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("link");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->link;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set link - Link
* @param \Pimcore\Model\DataObject\Data\Link|null $link
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setLink(?\Pimcore\Model\DataObject\Data\Link $link)
{
$this->link = $link;
return $this;
}
/**
* Get content - Inhalt
* @return string|null
*/
public function getContent(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("content");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("content")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set content - Inhalt
* @param string|null $content
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setContent(?string $content)
{
$this->content = $content;
return $this;
}
/**
* Get image - Bild Übersicht
* @return \Pimcore\Model\Asset\Image|null
*/
public function getImage(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("image");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->image;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set image - Bild Übersicht
* @param \Pimcore\Model\Asset\Image|null $image
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setImage(?\Pimcore\Model\Asset\Image $image)
{
$this->image = $image;
return $this;
}
/**
* Get imageHeader - Bild Header
* @return \Pimcore\Model\Asset\Image|null
*/
public function getImageHeader(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("imageHeader");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->imageHeader;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set imageHeader - Bild Header
* @param \Pimcore\Model\Asset\Image|null $imageHeader
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setImageHeader(?\Pimcore\Model\Asset\Image $imageHeader)
{
$this->imageHeader = $imageHeader;
return $this;
}
/**
* Get imageGallery - Bildergalerie
* @return \Pimcore\Model\DataObject\Data\ImageGallery|null
*/
public function getImageGallery(): ?\Pimcore\Model\DataObject\Data\ImageGallery
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("imageGallery");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->imageGallery;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set imageGallery - Bildergalerie
* @param \Pimcore\Model\DataObject\Data\ImageGallery|null $imageGallery
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setImageGallery(?\Pimcore\Model\DataObject\Data\ImageGallery $imageGallery)
{
$this->imageGallery = $imageGallery;
return $this;
}
/**
* Get podcast - Podcast
* @return \Pimcore\Model\DataObject\Podcast[]
*/
public function getPodcast(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("podcast");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("podcast")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set podcast - Podcast
* @param \Pimcore\Model\DataObject\Podcast[] $podcast
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setPodcast(?array $podcast)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("podcast");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getPodcast();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $podcast);
if (!$isEqual) {
$this->markFieldDirty("podcast", true);
}
$this->podcast = $fd->preSetData($this, $podcast);
return $this;
}
/**
* Get Snippets - Snippets
* @return \Pimcore\Model\Document\Snippet[]
*/
public function getSnippets(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Snippets");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("Snippets")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Snippets - Snippets
* @param \Pimcore\Model\Document\Snippet[] $Snippets
* @return \Pimcore\Model\DataObject\ThemaArtikel
*/
public function setSnippets(?array $Snippets)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
$fd = $this->getClass()->getFieldDefinition("Snippets");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getSnippets();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $Snippets);
if (!$isEqual) {
$this->markFieldDirty("Snippets", true);
}
$this->Snippets = $fd->preSetData($this, $Snippets);
return $this;
}
}