<?php
/**
* Inheritance: no
* Variants: no
Fields Summary:
- Url [input]
- Title [input]
- Tags [input]
- TeaserDescription [textarea]
- TeaserImg [image]
- Area [select]
- 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\ServiceClass\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByUrl($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByTags($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByTeaserDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByTeaserImg($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByArea($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByMetaTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getByMetaDescription($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ServiceClass\Listing|\Pimcore\Model\DataObject\ServiceClass|null getBySnipped($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class ServiceClass extends Concrete
{
protected $o_classId = "3";
protected $o_className = "ServiceClass";
protected $Url;
protected $Title;
protected $Tags;
protected $TeaserDescription;
protected $TeaserImg;
protected $Area;
protected $MetaTitle;
protected $MetaDescription;
protected $Snipped;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\ServiceClass
*/
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\ServiceClass
*/
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\ServiceClass
*/
public function setTitle(?string $Title)
{
$this->Title = $Title;
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\ServiceClass
*/
public function setTags(?string $Tags)
{
$this->Tags = $Tags;
return $this;
}
/**
* Get TeaserDescription - Teaser Description
* @return string|null
*/
public function getTeaserDescription(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("TeaserDescription");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->TeaserDescription;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set TeaserDescription - Teaser Description
* @param string|null $TeaserDescription
* @return \Pimcore\Model\DataObject\ServiceClass
*/
public function setTeaserDescription(?string $TeaserDescription)
{
$this->TeaserDescription = $TeaserDescription;
return $this;
}
/**
* Get TeaserImg - Teaser Image
* @return \Pimcore\Model\Asset\Image|null
*/
public function getTeaserImg(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("TeaserImg");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->TeaserImg;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set TeaserImg - Teaser Image
* @param \Pimcore\Model\Asset\Image|null $TeaserImg
* @return \Pimcore\Model\DataObject\ServiceClass
*/
public function setTeaserImg(?\Pimcore\Model\Asset\Image $TeaserImg)
{
$this->TeaserImg = $TeaserImg;
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\ServiceClass
*/
public function setArea(?string $Area)
{
$this->Area = $Area;
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\ServiceClass
*/
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\ServiceClass
*/
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\ServiceClass
*/
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;
}
}