<?php
/**
* Inheritance: no
* Variants: no
Fields Summary:
- Url [input]
- Title [input]
- Teaser [textarea]
- realTags [manyToManyObjectRelation]
- Tags [input]
- TeaserImage [image]
- Area [select]
- ReleaseDate [date]
- MetaTitle [input]
- MetaDescription [textarea]
- Snipped [manyToOneRelation]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByUrl($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByTeaser($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByRealTags($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByTags($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByTeaserImage($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByArea($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByReleaseDate($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByMetaTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getByMetaDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\SuccessStories\Listing|\Pimcore\Model\DataObject\SuccessStories|null getBySnipped($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class SuccessStories extends Concrete
{
protected $o_classId = "2";
protected $o_className = "SuccessStories";
protected $Url;
protected $Title;
protected $Teaser;
protected $realTags;
protected $Tags;
protected $TeaserImage;
protected $Area;
protected $ReleaseDate;
protected $MetaTitle;
protected $MetaDescription;
protected $Snipped;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get Url - URL-Path
* @return string|null
*/
public function getUrl(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Url");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Url;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Url - URL-Path
* @param string|null $Url
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setUrl(?string $Url)
{
$this->Url = $Url;
return $this;
}
/**
* Get Title - Title
* @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 - Title
* @param string|null $Title
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setTitle(?string $Title)
{
$this->Title = $Title;
return $this;
}
/**
* Get Teaser - Teaser-Description
* @return string|null
*/
public function getTeaser(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Teaser");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Teaser;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Teaser - Teaser-Description
* @param string|null $Teaser
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setTeaser(?string $Teaser)
{
$this->Teaser = $Teaser;
return $this;
}
/**
* Get realTags - Tags
* @return \Pimcore\Model\DataObject\Tag[]
*/
public function getRealTags(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("realTags");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("realTags")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set realTags - Tags
* @param \Pimcore\Model\DataObject\Tag[] $realTags
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setRealTags(?array $realTags)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("realTags");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getRealTags();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $realTags);
if (!$isEqual) {
$this->markFieldDirty("realTags", true);
}
$this->realTags = $fd->preSetData($this, $realTags);
return $this;
}
/**
* Get Tags - Tags
* @return string|null
*/
public function getTags(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Tags");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Tags;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Tags - Tags
* @param string|null $Tags
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setTags(?string $Tags)
{
$this->Tags = $Tags;
return $this;
}
/**
* Get TeaserImage - Teaser-Image
* @return \Pimcore\Model\Asset\Image|null
*/
public function getTeaserImage(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("TeaserImage");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->TeaserImage;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set TeaserImage - Teaser-Image
* @param \Pimcore\Model\Asset\Image|null $TeaserImage
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setTeaserImage(?\Pimcore\Model\Asset\Image $TeaserImage)
{
$this->TeaserImage = $TeaserImage;
return $this;
}
/**
* Get Area - Area
* @return string|null
*/
public function getArea(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Area");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->Area;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Area - Area
* @param string|null $Area
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setArea(?string $Area)
{
$this->Area = $Area;
return $this;
}
/**
* Get ReleaseDate - Release-Date
* @return \Carbon\Carbon|null
*/
public function getReleaseDate(): ?\Carbon\Carbon
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("ReleaseDate");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->ReleaseDate;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set ReleaseDate - Release-Date
* @param \Carbon\Carbon|null $ReleaseDate
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setReleaseDate(?\Carbon\Carbon $ReleaseDate)
{
$this->ReleaseDate = $ReleaseDate;
return $this;
}
/**
* Get MetaTitle - Meta Title
* @return string|null
*/
public function getMetaTitle(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("MetaTitle");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->MetaTitle;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set MetaTitle - Meta Title
* @param string|null $MetaTitle
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setMetaTitle(?string $MetaTitle)
{
$this->MetaTitle = $MetaTitle;
return $this;
}
/**
* Get MetaDescription - Meta Description
* @return string|null
*/
public function getMetaDescription(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("MetaDescription");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->MetaDescription;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set MetaDescription - Meta Description
* @param string|null $MetaDescription
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setMetaDescription(?string $MetaDescription)
{
$this->MetaDescription = $MetaDescription;
return $this;
}
/**
* Get Snipped - Snipped
* @return \Pimcore\Model\Document\Snippet|null
*/
public function getSnipped(): ?\Pimcore\Model\Element\AbstractElement
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("Snipped");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("Snipped")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set Snipped - Snipped
* @param \Pimcore\Model\Document\Snippet $Snipped
* @return \Pimcore\Model\DataObject\SuccessStories
*/
public function setSnipped(?\Pimcore\Model\Element\AbstractElement $Snipped)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("Snipped");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getSnipped();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $Snipped);
if (!$isEqual) {
$this->markFieldDirty("Snipped", true);
}
$this->Snipped = $fd->preSetData($this, $Snipped);
return $this;
}
}