var/classes/DataObject/BlogArticle.php line 74

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - teaserImage [image]
  8.  * - topArticle [checkbox]
  9.  * - articleDate [date]
  10.  * - portals [manyToManyObjectRelation]
  11.  * - regions [manyToManyObjectRelation]
  12.  * - categories [manyToManyObjectRelation]
  13.  * - blogThemes [manyToManyObjectRelation]
  14.  * - author [manyToOneRelation]
  15.  * - legacyId [input]
  16.  * - localizedfields [localizedfields]
  17.  * -- title [input]
  18.  * -- readingTime [numeric]
  19.  * -- shortDescription [textarea]
  20.  * -- advertismentNote [input]
  21.  * -- description [wysiwyg]
  22.  * -- additionalDescription [wysiwyg]
  23.  * -- metaTitle [input]
  24.  * -- metaDescription [textarea]
  25.  * - keywords [textarea]
  26.  * - textblocks [fieldcollections]
  27.  * - authToken [input]
  28.  * - submitted [checkbox]
  29.  * - verified [checkbox]
  30.  * - notified [checkbox]
  31.  * - submissionConsent [consent]
  32.  * - notifiedPortals [manyToManyObjectRelation]
  33.  * - video [video]
  34.  * - videoText [input]
  35.  * - videoDescription [textarea]
  36.  */
  37. namespace Pimcore\Model\DataObject;
  38. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  39. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  40. /**
  41. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing getList(array $config = [])
  42. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByTeaserImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  43. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByTopArticle($value, $limit = 0, $offset = 0, $objectTypes = null)
  44. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByArticleDate($value, $limit = 0, $offset = 0, $objectTypes = null)
  45. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByPortals($value, $limit = 0, $offset = 0, $objectTypes = null)
  46. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByRegions($value, $limit = 0, $offset = 0, $objectTypes = null)
  47. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByCategories($value, $limit = 0, $offset = 0, $objectTypes = null)
  48. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByBlogThemes($value, $limit = 0, $offset = 0, $objectTypes = null)
  49. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByAuthor($value, $limit = 0, $offset = 0, $objectTypes = null)
  50. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByLegacyId($value, $limit = 0, $offset = 0, $objectTypes = null)
  51. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  52. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByTitle($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  53. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByReadingTime($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  54. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByShortDescription($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  55. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByAdvertismentNote($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  56. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByDescription($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  57. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByAdditionalDescription($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  58. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByMetaTitle($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  59. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByMetaDescription($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  60. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByKeywords($value, $limit = 0, $offset = 0, $objectTypes = null)
  61. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByAuthToken($value, $limit = 0, $offset = 0, $objectTypes = null)
  62. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getBySubmitted($value, $limit = 0, $offset = 0, $objectTypes = null)
  63. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByVerified($value, $limit = 0, $offset = 0, $objectTypes = null)
  64. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByNotified($value, $limit = 0, $offset = 0, $objectTypes = null)
  65. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByNotifiedPortals($value, $limit = 0, $offset = 0, $objectTypes = null)
  66. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByVideoText($value, $limit = 0, $offset = 0, $objectTypes = null)
  67. * @method static \Pimcore\Model\DataObject\BlogArticle\Listing|\Pimcore\Model\DataObject\BlogArticle|null getByVideoDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
  68. */
  69. class BlogArticle extends Concrete
  70. {
  71. protected $o_classId "BlogArticle";
  72. protected $o_className "BlogArticle";
  73. protected $teaserImage;
  74. protected $topArticle;
  75. protected $articleDate;
  76. protected $portals;
  77. protected $regions;
  78. protected $categories;
  79. protected $blogThemes;
  80. protected $author;
  81. protected $legacyId;
  82. protected $localizedfields;
  83. protected $keywords;
  84. protected $textblocks;
  85. protected $authToken;
  86. protected $submitted;
  87. protected $verified;
  88. protected $notified;
  89. protected $submissionConsent;
  90. protected $notifiedPortals;
  91. protected $video;
  92. protected $videoText;
  93. protected $videoDescription;
  94. /**
  95. * @param array $values
  96. * @return \Pimcore\Model\DataObject\BlogArticle
  97. */
  98. public static function create($values = array()) {
  99.     $object = new static();
  100.     $object->setValues($values);
  101.     return $object;
  102. }
  103. /**
  104. * Get teaserImage - Vorschaubild
  105. * @return \Pimcore\Model\Asset\Image|null
  106. */
  107. public function getTeaserImage()
  108. {
  109.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  110.         $preValue $this->preGetValue("teaserImage");
  111.         if ($preValue !== null) {
  112.             return $preValue;
  113.         }
  114.     }
  115.     $data $this->teaserImage;
  116.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  117.         return $data->getPlain();
  118.     }
  119.     return $data;
  120. }
  121. /**
  122. * Set teaserImage - Vorschaubild
  123. * @param \Pimcore\Model\Asset\Image|null $teaserImage
  124. * @return \Pimcore\Model\DataObject\BlogArticle
  125. */
  126. public function setTeaserImage($teaserImage)
  127. {
  128.     $this->teaserImage $teaserImage;
  129.     return $this;
  130. }
  131. /**
  132. * Get topArticle - Top-Artikel
  133. * @return bool|null
  134. */
  135. public function getTopArticle()
  136. {
  137.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  138.         $preValue $this->preGetValue("topArticle");
  139.         if ($preValue !== null) {
  140.             return $preValue;
  141.         }
  142.     }
  143.     $data $this->topArticle;
  144.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  145.         return $data->getPlain();
  146.     }
  147.     return $data;
  148. }
  149. /**
  150. * Set topArticle - Top-Artikel
  151. * @param bool|null $topArticle
  152. * @return \Pimcore\Model\DataObject\BlogArticle
  153. */
  154. public function setTopArticle($topArticle)
  155. {
  156.     $this->topArticle $topArticle;
  157.     return $this;
  158. }
  159. /**
  160. * Get articleDate - Datum
  161. * @return \Carbon\Carbon|null
  162. */
  163. public function getArticleDate()
  164. {
  165.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  166.         $preValue $this->preGetValue("articleDate");
  167.         if ($preValue !== null) {
  168.             return $preValue;
  169.         }
  170.     }
  171.     $data $this->articleDate;
  172.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  173.         return $data->getPlain();
  174.     }
  175.     return $data;
  176. }
  177. /**
  178. * Set articleDate - Datum
  179. * @param \Carbon\Carbon|null $articleDate
  180. * @return \Pimcore\Model\DataObject\BlogArticle
  181. */
  182. public function setArticleDate($articleDate)
  183. {
  184.     $this->articleDate $articleDate;
  185.     return $this;
  186. }
  187. /**
  188. * Get portals - Portals
  189. * @return \Pimcore\Model\DataObject\BlogPortal[]
  190. */
  191. public function getPortals()
  192. {
  193.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  194.         $preValue $this->preGetValue("portals");
  195.         if ($preValue !== null) {
  196.             return $preValue;
  197.         }
  198.     }
  199.     $data $this->getClass()->getFieldDefinition("portals")->preGetData($this);
  200.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  201.         return $data->getPlain();
  202.     }
  203.     return $data;
  204. }
  205. /**
  206. * Set portals - Portals
  207. * @param \Pimcore\Model\DataObject\BlogPortal[] $portals
  208. * @return \Pimcore\Model\DataObject\BlogArticle
  209. */
  210. public function setPortals($portals)
  211. {
  212.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  213.     $fd $this->getClass()->getFieldDefinition("portals");
  214.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  215.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  216.     $currentData $this->getPortals();
  217.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  218.     $isEqual $fd->isEqual($currentData$portals);
  219.     if (!$isEqual) {
  220.         $this->markFieldDirty("portals"true);
  221.     }
  222.     $this->portals $fd->preSetData($this$portals);
  223.     return $this;
  224. }
  225. /**
  226. * Get regions - Regions
  227. * @return \Pimcore\Model\DataObject\Region[]
  228. */
  229. public function getRegions()
  230. {
  231.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  232.         $preValue $this->preGetValue("regions");
  233.         if ($preValue !== null) {
  234.             return $preValue;
  235.         }
  236.     }
  237.     $data $this->getClass()->getFieldDefinition("regions")->preGetData($this);
  238.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  239.         return $data->getPlain();
  240.     }
  241.     return $data;
  242. }
  243. /**
  244. * Set regions - Regions
  245. * @param \Pimcore\Model\DataObject\Region[] $regions
  246. * @return \Pimcore\Model\DataObject\BlogArticle
  247. */
  248. public function setRegions($regions)
  249. {
  250.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  251.     $fd $this->getClass()->getFieldDefinition("regions");
  252.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  253.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  254.     $currentData $this->getRegions();
  255.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  256.     $isEqual $fd->isEqual($currentData$regions);
  257.     if (!$isEqual) {
  258.         $this->markFieldDirty("regions"true);
  259.     }
  260.     $this->regions $fd->preSetData($this$regions);
  261.     return $this;
  262. }
  263. /**
  264. * Get categories - Kategorien
  265. * @return \Pimcore\Model\DataObject\BlogCategory[]
  266. */
  267. public function getCategories()
  268. {
  269.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  270.         $preValue $this->preGetValue("categories");
  271.         if ($preValue !== null) {
  272.             return $preValue;
  273.         }
  274.     }
  275.     $data $this->getClass()->getFieldDefinition("categories")->preGetData($this);
  276.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  277.         return $data->getPlain();
  278.     }
  279.     return $data;
  280. }
  281. /**
  282. * Set categories - Kategorien
  283. * @param \Pimcore\Model\DataObject\BlogCategory[] $categories
  284. * @return \Pimcore\Model\DataObject\BlogArticle
  285. */
  286. public function setCategories($categories)
  287. {
  288.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  289.     $fd $this->getClass()->getFieldDefinition("categories");
  290.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  291.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  292.     $currentData $this->getCategories();
  293.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  294.     $isEqual $fd->isEqual($currentData$categories);
  295.     if (!$isEqual) {
  296.         $this->markFieldDirty("categories"true);
  297.     }
  298.     $this->categories $fd->preSetData($this$categories);
  299.     return $this;
  300. }
  301. /**
  302. * Get blogThemes - Themen
  303. * @return \Pimcore\Model\DataObject\BlogTheme[]
  304. */
  305. public function getBlogThemes()
  306. {
  307.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  308.         $preValue $this->preGetValue("blogThemes");
  309.         if ($preValue !== null) {
  310.             return $preValue;
  311.         }
  312.     }
  313.     $data $this->getClass()->getFieldDefinition("blogThemes")->preGetData($this);
  314.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  315.         return $data->getPlain();
  316.     }
  317.     return $data;
  318. }
  319. /**
  320. * Set blogThemes - Themen
  321. * @param \Pimcore\Model\DataObject\BlogTheme[] $blogThemes
  322. * @return \Pimcore\Model\DataObject\BlogArticle
  323. */
  324. public function setBlogThemes($blogThemes)
  325. {
  326.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  327.     $fd $this->getClass()->getFieldDefinition("blogThemes");
  328.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  329.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  330.     $currentData $this->getBlogThemes();
  331.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  332.     $isEqual $fd->isEqual($currentData$blogThemes);
  333.     if (!$isEqual) {
  334.         $this->markFieldDirty("blogThemes"true);
  335.     }
  336.     $this->blogThemes $fd->preSetData($this$blogThemes);
  337.     return $this;
  338. }
  339. /**
  340. * Get author - RedakteurIn
  341. * @return \Pimcore\Model\DataObject\BlogAuthor|null
  342. */
  343. public function getAuthor()
  344. {
  345.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  346.         $preValue $this->preGetValue("author");
  347.         if ($preValue !== null) {
  348.             return $preValue;
  349.         }
  350.     }
  351.     $data $this->getClass()->getFieldDefinition("author")->preGetData($this);
  352.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  353.         return $data->getPlain();
  354.     }
  355.     return $data;
  356. }
  357. /**
  358. * Set author - RedakteurIn
  359. * @param \Pimcore\Model\DataObject\BlogAuthor $author
  360. * @return \Pimcore\Model\DataObject\BlogArticle
  361. */
  362. public function setAuthor($author)
  363. {
  364.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
  365.     $fd $this->getClass()->getFieldDefinition("author");
  366.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  367.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  368.     $currentData $this->getAuthor();
  369.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  370.     $isEqual $fd->isEqual($currentData$author);
  371.     if (!$isEqual) {
  372.         $this->markFieldDirty("author"true);
  373.     }
  374.     $this->author $fd->preSetData($this$author);
  375.     return $this;
  376. }
  377. /**
  378. * Get legacyId - legacyId
  379. * @return string|null
  380. */
  381. public function getLegacyId()
  382. {
  383.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  384.         $preValue $this->preGetValue("legacyId");
  385.         if ($preValue !== null) {
  386.             return $preValue;
  387.         }
  388.     }
  389.     $data $this->legacyId;
  390.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  391.         return $data->getPlain();
  392.     }
  393.     return $data;
  394. }
  395. /**
  396. * Set legacyId - legacyId
  397. * @param string|null $legacyId
  398. * @return \Pimcore\Model\DataObject\BlogArticle
  399. */
  400. public function setLegacyId($legacyId)
  401. {
  402.     $this->legacyId $legacyId;
  403.     return $this;
  404. }
  405. /**
  406. * Get localizedfields - 
  407. * @return \Pimcore\Model\DataObject\Localizedfield|null
  408. */
  409. public function getLocalizedfields()
  410. {
  411.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  412.         $preValue $this->preGetValue("localizedfields");
  413.         if ($preValue !== null) {
  414.             return $preValue;
  415.         }
  416.     }
  417.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  418.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  419.         return $data->getPlain();
  420.     }
  421.     return $data;
  422. }
  423. /**
  424. * Get title - Titel
  425. * @return string|null
  426. */
  427. public function getTitle($language null)
  428. {
  429.     $data $this->getLocalizedfields()->getLocalizedValue("title"$language);
  430.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  431.         $preValue $this->preGetValue("title");
  432.         if ($preValue !== null) {
  433.             return $preValue;
  434.         }
  435.     }
  436.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  437.         return $data->getPlain();
  438.     }
  439.     return $data;
  440. }
  441. /**
  442. * Get readingTime - Reading Time
  443. * @return int|null
  444. */
  445. public function getReadingTime($language null)
  446. {
  447.     $data $this->getLocalizedfields()->getLocalizedValue("readingTime"$language);
  448.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  449.         $preValue $this->preGetValue("readingTime");
  450.         if ($preValue !== null) {
  451.             return $preValue;
  452.         }
  453.     }
  454.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  455.         return $data->getPlain();
  456.     }
  457.     return $data;
  458. }
  459. /**
  460. * Get shortDescription - Kurzbeschreibung
  461. * @return string|null
  462. */
  463. public function getShortDescription($language null)
  464. {
  465.     $data $this->getLocalizedfields()->getLocalizedValue("shortDescription"$language);
  466.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  467.         $preValue $this->preGetValue("shortDescription");
  468.         if ($preValue !== null) {
  469.             return $preValue;
  470.         }
  471.     }
  472.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  473.         return $data->getPlain();
  474.     }
  475.     return $data;
  476. }
  477. /**
  478. * Get advertismentNote - Anzeigenhinweis
  479. * @return string|null
  480. */
  481. public function getAdvertismentNote($language null)
  482. {
  483.     $data $this->getLocalizedfields()->getLocalizedValue("advertismentNote"$language);
  484.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  485.         $preValue $this->preGetValue("advertismentNote");
  486.         if ($preValue !== null) {
  487.             return $preValue;
  488.         }
  489.     }
  490.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  491.         return $data->getPlain();
  492.     }
  493.     return $data;
  494. }
  495. /**
  496. * Get description - Beschreibung
  497. * @return string|null
  498. */
  499. public function getDescription($language null)
  500. {
  501.     $data $this->getLocalizedfields()->getLocalizedValue("description"$language);
  502.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  503.         $preValue $this->preGetValue("description");
  504.         if ($preValue !== null) {
  505.             return $preValue;
  506.         }
  507.     }
  508.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  509.         return $data->getPlain();
  510.     }
  511.     return $data;
  512. }
  513. /**
  514. * Get additionalDescription - Zusatz (aufklappbar)
  515. * @return string|null
  516. */
  517. public function getAdditionalDescription($language null)
  518. {
  519.     $data $this->getLocalizedfields()->getLocalizedValue("additionalDescription"$language);
  520.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  521.         $preValue $this->preGetValue("additionalDescription");
  522.         if ($preValue !== null) {
  523.             return $preValue;
  524.         }
  525.     }
  526.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  527.         return $data->getPlain();
  528.     }
  529.     return $data;
  530. }
  531. /**
  532. * Get metaTitle - Meta Title
  533. * @return string|null
  534. */
  535. public function getMetaTitle($language null)
  536. {
  537.     $data $this->getLocalizedfields()->getLocalizedValue("metaTitle"$language);
  538.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  539.         $preValue $this->preGetValue("metaTitle");
  540.         if ($preValue !== null) {
  541.             return $preValue;
  542.         }
  543.     }
  544.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  545.         return $data->getPlain();
  546.     }
  547.     return $data;
  548. }
  549. /**
  550. * Get metaDescription - Meta Description
  551. * @return string|null
  552. */
  553. public function getMetaDescription($language null)
  554. {
  555.     $data $this->getLocalizedfields()->getLocalizedValue("metaDescription"$language);
  556.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  557.         $preValue $this->preGetValue("metaDescription");
  558.         if ($preValue !== null) {
  559.             return $preValue;
  560.         }
  561.     }
  562.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  563.         return $data->getPlain();
  564.     }
  565.     return $data;
  566. }
  567. /**
  568. * Set localizedfields - 
  569. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  570. * @return \Pimcore\Model\DataObject\BlogArticle
  571. */
  572. public function setLocalizedfields($localizedfields)
  573. {
  574.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  575.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  576.     $currentData $this->getLocalizedfields();
  577.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  578.     $this->markFieldDirty("localizedfields"true);
  579.     $this->localizedfields $localizedfields;
  580.     return $this;
  581. }
  582. /**
  583. * Set title - Titel
  584. * @param string|null $title
  585. * @return \Pimcore\Model\DataObject\BlogArticle
  586. */
  587. public function setTitle ($title$language null)
  588. {
  589.     $isEqual false;
  590.     $this->getLocalizedfields()->setLocalizedValue("title"$title$language, !$isEqual);
  591.     return $this;
  592. }
  593. /**
  594. * Set readingTime - Reading Time
  595. * @param int|null $readingTime
  596. * @return \Pimcore\Model\DataObject\BlogArticle
  597. */
  598. public function setReadingTime ($readingTime$language null)
  599. {
  600.     $isEqual false;
  601.     $this->getLocalizedfields()->setLocalizedValue("readingTime"$readingTime$language, !$isEqual);
  602.     return $this;
  603. }
  604. /**
  605. * Set shortDescription - Kurzbeschreibung
  606. * @param string|null $shortDescription
  607. * @return \Pimcore\Model\DataObject\BlogArticle
  608. */
  609. public function setShortDescription ($shortDescription$language null)
  610. {
  611.     $isEqual false;
  612.     $this->getLocalizedfields()->setLocalizedValue("shortDescription"$shortDescription$language, !$isEqual);
  613.     return $this;
  614. }
  615. /**
  616. * Set advertismentNote - Anzeigenhinweis
  617. * @param string|null $advertismentNote
  618. * @return \Pimcore\Model\DataObject\BlogArticle
  619. */
  620. public function setAdvertismentNote ($advertismentNote$language null)
  621. {
  622.     $isEqual false;
  623.     $this->getLocalizedfields()->setLocalizedValue("advertismentNote"$advertismentNote$language, !$isEqual);
  624.     return $this;
  625. }
  626. /**
  627. * Set description - Beschreibung
  628. * @param string|null $description
  629. * @return \Pimcore\Model\DataObject\BlogArticle
  630. */
  631. public function setDescription ($description$language null)
  632. {
  633.     $isEqual false;
  634.     $this->getLocalizedfields()->setLocalizedValue("description"$description$language, !$isEqual);
  635.     return $this;
  636. }
  637. /**
  638. * Set additionalDescription - Zusatz (aufklappbar)
  639. * @param string|null $additionalDescription
  640. * @return \Pimcore\Model\DataObject\BlogArticle
  641. */
  642. public function setAdditionalDescription ($additionalDescription$language null)
  643. {
  644.     $isEqual false;
  645.     $this->getLocalizedfields()->setLocalizedValue("additionalDescription"$additionalDescription$language, !$isEqual);
  646.     return $this;
  647. }
  648. /**
  649. * Set metaTitle - Meta Title
  650. * @param string|null $metaTitle
  651. * @return \Pimcore\Model\DataObject\BlogArticle
  652. */
  653. public function setMetaTitle ($metaTitle$language null)
  654. {
  655.     $isEqual false;
  656.     $this->getLocalizedfields()->setLocalizedValue("metaTitle"$metaTitle$language, !$isEqual);
  657.     return $this;
  658. }
  659. /**
  660. * Set metaDescription - Meta Description
  661. * @param string|null $metaDescription
  662. * @return \Pimcore\Model\DataObject\BlogArticle
  663. */
  664. public function setMetaDescription ($metaDescription$language null)
  665. {
  666.     $isEqual false;
  667.     $this->getLocalizedfields()->setLocalizedValue("metaDescription"$metaDescription$language, !$isEqual);
  668.     return $this;
  669. }
  670. /**
  671. * Get keywords - Keywords
  672. * @return string|null
  673. */
  674. public function getKeywords()
  675. {
  676.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  677.         $preValue $this->preGetValue("keywords");
  678.         if ($preValue !== null) {
  679.             return $preValue;
  680.         }
  681.     }
  682.     $data $this->keywords;
  683.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  684.         return $data->getPlain();
  685.     }
  686.     return $data;
  687. }
  688. /**
  689. * Set keywords - Keywords
  690. * @param string|null $keywords
  691. * @return \Pimcore\Model\DataObject\BlogArticle
  692. */
  693. public function setKeywords($keywords)
  694. {
  695.     $this->keywords $keywords;
  696.     return $this;
  697. }
  698. /**
  699. * @return \Pimcore\Model\DataObject\Fieldcollection|null
  700. */
  701. public function getTextblocks()
  702. {
  703.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  704.         $preValue $this->preGetValue("textblocks");
  705.         if ($preValue !== null) {
  706.             return $preValue;
  707.         }
  708.     }
  709.     $data $this->getClass()->getFieldDefinition("textblocks")->preGetData($this);
  710.     return $data;
  711. }
  712. /**
  713. * Set textblocks - Textblöcke
  714. * @param \Pimcore\Model\DataObject\Fieldcollection|null $textblocks
  715. * @return \Pimcore\Model\DataObject\BlogArticle
  716. */
  717. public function setTextblocks($textblocks)
  718. {
  719.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Fieldcollections $fd */
  720.     $fd $this->getClass()->getFieldDefinition("textblocks");
  721.     $this->textblocks $fd->preSetData($this$textblocks);
  722.     return $this;
  723. }
  724. /**
  725. * Get authToken - authToken
  726. * @return string|null
  727. */
  728. public function getAuthToken()
  729. {
  730.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  731.         $preValue $this->preGetValue("authToken");
  732.         if ($preValue !== null) {
  733.             return $preValue;
  734.         }
  735.     }
  736.     $data $this->authToken;
  737.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  738.         return $data->getPlain();
  739.     }
  740.     return $data;
  741. }
  742. /**
  743. * Set authToken - authToken
  744. * @param string|null $authToken
  745. * @return \Pimcore\Model\DataObject\BlogArticle
  746. */
  747. public function setAuthToken($authToken)
  748. {
  749.     $this->authToken $authToken;
  750.     return $this;
  751. }
  752. /**
  753. * Get submitted - Submitted
  754. * @return bool|null
  755. */
  756. public function getSubmitted()
  757. {
  758.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  759.         $preValue $this->preGetValue("submitted");
  760.         if ($preValue !== null) {
  761.             return $preValue;
  762.         }
  763.     }
  764.     $data $this->submitted;
  765.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  766.         return $data->getPlain();
  767.     }
  768.     return $data;
  769. }
  770. /**
  771. * Set submitted - Submitted
  772. * @param bool|null $submitted
  773. * @return \Pimcore\Model\DataObject\BlogArticle
  774. */
  775. public function setSubmitted($submitted)
  776. {
  777.     $this->submitted $submitted;
  778.     return $this;
  779. }
  780. /**
  781. * Get verified - Verified
  782. * @return bool|null
  783. */
  784. public function getVerified()
  785. {
  786.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  787.         $preValue $this->preGetValue("verified");
  788.         if ($preValue !== null) {
  789.             return $preValue;
  790.         }
  791.     }
  792.     $data $this->verified;
  793.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  794.         return $data->getPlain();
  795.     }
  796.     return $data;
  797. }
  798. /**
  799. * Set verified - Verified
  800. * @param bool|null $verified
  801. * @return \Pimcore\Model\DataObject\BlogArticle
  802. */
  803. public function setVerified($verified)
  804. {
  805.     $this->verified $verified;
  806.     return $this;
  807. }
  808. /**
  809. * Get notified - Notified
  810. * @return bool|null
  811. */
  812. public function getNotified()
  813. {
  814.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  815.         $preValue $this->preGetValue("notified");
  816.         if ($preValue !== null) {
  817.             return $preValue;
  818.         }
  819.     }
  820.     $data $this->notified;
  821.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  822.         return $data->getPlain();
  823.     }
  824.     return $data;
  825. }
  826. /**
  827. * Set notified - Notified
  828. * @param bool|null $notified
  829. * @return \Pimcore\Model\DataObject\BlogArticle
  830. */
  831. public function setNotified($notified)
  832. {
  833.     $this->notified $notified;
  834.     return $this;
  835. }
  836. /**
  837. * Get submissionConsent - submissionConsent
  838. * @return \Pimcore\Model\DataObject\Data\Consent|null
  839. */
  840. public function getSubmissionConsent()
  841. {
  842.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  843.         $preValue $this->preGetValue("submissionConsent");
  844.         if ($preValue !== null) {
  845.             return $preValue;
  846.         }
  847.     }
  848.     $data $this->submissionConsent;
  849.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  850.         return $data->getPlain();
  851.     }
  852.     return $data;
  853. }
  854. /**
  855. * Set submissionConsent - submissionConsent
  856. * @param \Pimcore\Model\DataObject\Data\Consent|null $submissionConsent
  857. * @return \Pimcore\Model\DataObject\BlogArticle
  858. */
  859. public function setSubmissionConsent($submissionConsent)
  860. {
  861.     $this->submissionConsent $submissionConsent;
  862.     return $this;
  863. }
  864. /**
  865. * Get notifiedPortals - Notified Portals
  866. * @return \Pimcore\Model\DataObject\BlogPortal[]
  867. */
  868. public function getNotifiedPortals()
  869. {
  870.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  871.         $preValue $this->preGetValue("notifiedPortals");
  872.         if ($preValue !== null) {
  873.             return $preValue;
  874.         }
  875.     }
  876.     $data $this->getClass()->getFieldDefinition("notifiedPortals")->preGetData($this);
  877.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  878.         return $data->getPlain();
  879.     }
  880.     return $data;
  881. }
  882. /**
  883. * Set notifiedPortals - Notified Portals
  884. * @param \Pimcore\Model\DataObject\BlogPortal[] $notifiedPortals
  885. * @return \Pimcore\Model\DataObject\BlogArticle
  886. */
  887. public function setNotifiedPortals($notifiedPortals)
  888. {
  889.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
  890.     $fd $this->getClass()->getFieldDefinition("notifiedPortals");
  891.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  892.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  893.     $currentData $this->getNotifiedPortals();
  894.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  895.     $isEqual $fd->isEqual($currentData$notifiedPortals);
  896.     if (!$isEqual) {
  897.         $this->markFieldDirty("notifiedPortals"true);
  898.     }
  899.     $this->notifiedPortals $fd->preSetData($this$notifiedPortals);
  900.     return $this;
  901. }
  902. /**
  903. * Get video - Video
  904. * @return \Pimcore\Model\DataObject\Data\Video|null
  905. */
  906. public function getVideo()
  907. {
  908.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  909.         $preValue $this->preGetValue("video");
  910.         if ($preValue !== null) {
  911.             return $preValue;
  912.         }
  913.     }
  914.     $data $this->video;
  915.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  916.         return $data->getPlain();
  917.     }
  918.     return $data;
  919. }
  920. /**
  921. * Set video - Video
  922. * @param \Pimcore\Model\DataObject\Data\Video|null $video
  923. * @return \Pimcore\Model\DataObject\BlogArticle
  924. */
  925. public function setVideo($video)
  926. {
  927.     $this->video $video;
  928.     return $this;
  929. }
  930. /**
  931. * Get videoText - Video Text
  932. * @return string|null
  933. */
  934. public function getVideoText()
  935. {
  936.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  937.         $preValue $this->preGetValue("videoText");
  938.         if ($preValue !== null) {
  939.             return $preValue;
  940.         }
  941.     }
  942.     $data $this->videoText;
  943.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  944.         return $data->getPlain();
  945.     }
  946.     return $data;
  947. }
  948. /**
  949. * Set videoText - Video Text
  950. * @param string|null $videoText
  951. * @return \Pimcore\Model\DataObject\BlogArticle
  952. */
  953. public function setVideoText($videoText)
  954. {
  955.     $this->videoText $videoText;
  956.     return $this;
  957. }
  958. /**
  959. * Get videoDescription - Video Description
  960. * @return string|null
  961. */
  962. public function getVideoDescription()
  963. {
  964.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  965.         $preValue $this->preGetValue("videoDescription");
  966.         if ($preValue !== null) {
  967.             return $preValue;
  968.         }
  969.     }
  970.     $data $this->videoDescription;
  971.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  972.         return $data->getPlain();
  973.     }
  974.     return $data;
  975. }
  976. /**
  977. * Set videoDescription - Video Description
  978. * @param string|null $videoDescription
  979. * @return \Pimcore\Model\DataObject\BlogArticle
  980. */
  981. public function setVideoDescription($videoDescription)
  982. {
  983.     $this->videoDescription $videoDescription;
  984.     return $this;
  985. }
  986. }