<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - date [date]
* - category [manyToManyRelation]
* - maintitle [textarea]
* - intro [wysiwyg]
* - facts [structuredTable]
* - textLeft [wysiwyg]
* - textRight [wysiwyg]
* - video [video]
* - image [image]
* - shadowImage [image]
* - gallery [imageGallery]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Projekt\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByDate($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByCategory($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByMaintitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByIntro($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByTextLeft($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByTextRight($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByImage($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Projekt\Listing|\Pimcore\Model\DataObject\Projekt|null getByShadowImage($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Projekt extends Concrete
{
protected $o_classId = "Projekt";
protected $o_className = "Projekt";
protected $date;
protected $category;
protected $maintitle;
protected $intro;
protected $facts;
protected $textLeft;
protected $textRight;
protected $video;
protected $image;
protected $shadowImage;
protected $gallery;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Projekt
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get date - Date
* @return \Carbon\Carbon|null
*/
public function getDate(): ?\Carbon\Carbon
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("date");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->date;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set date - Date
* @param \Carbon\Carbon|null $date
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setDate(?\Carbon\Carbon $date)
{
$this->date = $date;
return $this;
}
/**
* Get category - Category
* @return \Pimcore\Model\DataObject\Category[]
*/
public function getCategory(): array
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("category");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("category")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set category - Category
* @param \Pimcore\Model\DataObject\Category[] $category
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setCategory(?array $category)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
$fd = $this->getClass()->getFieldDefinition("category");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getCategory();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $category);
if (!$isEqual) {
$this->markFieldDirty("category", true);
}
$this->category = $fd->preSetData($this, $category);
return $this;
}
/**
* Get maintitle - Maintitle
* @return string|null
*/
public function getMaintitle(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("maintitle");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->maintitle;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set maintitle - Maintitle
* @param string|null $maintitle
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setMaintitle(?string $maintitle)
{
$this->maintitle = $maintitle;
return $this;
}
/**
* Get intro - Intro
* @return string|null
*/
public function getIntro(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("intro");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("intro")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set intro - Intro
* @param string|null $intro
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setIntro(?string $intro)
{
$this->intro = $intro;
return $this;
}
/**
* Get facts - Facts
* @return \Pimcore\Model\DataObject\Data\StructuredTable|null
*/
public function getFacts(): ?\Pimcore\Model\DataObject\Data\StructuredTable
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("facts");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->facts;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set facts - Facts
* @param \Pimcore\Model\DataObject\Data\StructuredTable|null $facts
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setFacts(?\Pimcore\Model\DataObject\Data\StructuredTable $facts)
{
$this->facts = $facts;
return $this;
}
/**
* Get textLeft - Text Left
* @return string|null
*/
public function getTextLeft(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("textLeft");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("textLeft")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set textLeft - Text Left
* @param string|null $textLeft
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setTextLeft(?string $textLeft)
{
$this->textLeft = $textLeft;
return $this;
}
/**
* Get textRight - Text Right
* @return string|null
*/
public function getTextRight(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("textRight");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("textRight")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set textRight - Text Right
* @param string|null $textRight
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setTextRight(?string $textRight)
{
$this->textRight = $textRight;
return $this;
}
/**
* Get video - Video
* @return \Pimcore\Model\DataObject\Data\Video|null
*/
public function getVideo(): ?\Pimcore\Model\DataObject\Data\Video
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("video");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->video;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set video - Video
* @param \Pimcore\Model\DataObject\Data\Video|null $video
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setVideo(?\Pimcore\Model\DataObject\Data\Video $video)
{
$this->video = $video;
return $this;
}
/**
* Get image - Image
* @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 - Image
* @param \Pimcore\Model\Asset\Image|null $image
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setImage(?\Pimcore\Model\Asset\Image $image)
{
$this->image = $image;
return $this;
}
/**
* Get shadowImage - Shadow Image
* @return \Pimcore\Model\Asset\Image|null
*/
public function getShadowImage(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("shadowImage");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->shadowImage;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set shadowImage - Shadow Image
* @param \Pimcore\Model\Asset\Image|null $shadowImage
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setShadowImage(?\Pimcore\Model\Asset\Image $shadowImage)
{
$this->shadowImage = $shadowImage;
return $this;
}
/**
* Get gallery - Gallery
* @return \Pimcore\Model\DataObject\Data\ImageGallery|null
*/
public function getGallery(): ?\Pimcore\Model\DataObject\Data\ImageGallery
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("gallery");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->gallery;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set gallery - Gallery
* @param \Pimcore\Model\DataObject\Data\ImageGallery|null $gallery
* @return \Pimcore\Model\DataObject\Projekt
*/
public function setGallery(?\Pimcore\Model\DataObject\Data\ImageGallery $gallery)
{
$this->gallery = $gallery;
return $this;
}
}