<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - title [input]
* - subtitle [input]
* - text [wysiwyg]
* - contentElemente [fieldcollections]
* - link [link]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\AccordionElement\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\AccordionElement\Listing|\Pimcore\Model\DataObject\AccordionElement|null getByTitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AccordionElement\Listing|\Pimcore\Model\DataObject\AccordionElement|null getBySubtitle($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AccordionElement\Listing|\Pimcore\Model\DataObject\AccordionElement|null getByText($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class AccordionElement extends Concrete
{
protected $o_classId = "AccordionElement";
protected $o_className = "AccordionElement";
protected $title;
protected $subtitle;
protected $text;
protected $contentElemente;
protected $link;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\AccordionElement
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* 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\AccordionElement
*/
public function setTitle(?string $title)
{
$this->title = $title;
return $this;
}
/**
* Get subtitle - Subtitle
* @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 - Subtitle
* @param string|null $subtitle
* @return \Pimcore\Model\DataObject\AccordionElement
*/
public function setSubtitle(?string $subtitle)
{
$this->subtitle = $subtitle;
return $this;
}
/**
* Get text - Text
* @return string|null
*/
public function getText(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("text");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("text")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set text - Text
* @param string|null $text
* @return \Pimcore\Model\DataObject\AccordionElement
*/
public function setText(?string $text)
{
$this->text = $text;
return $this;
}
/**
* @return \Pimcore\Model\DataObject\Fieldcollection|null
*/
public function getContentElemente(): ?\Pimcore\Model\DataObject\Fieldcollection
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("contentElemente");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("contentElemente")->preGetData($this);
return $data;
}
/**
* Set contentElemente - Content Elemente
* @param \Pimcore\Model\DataObject\Fieldcollection|null $contentElemente
* @return \Pimcore\Model\DataObject\AccordionElement
*/
public function setContentElemente(?\Pimcore\Model\DataObject\Fieldcollection $contentElemente)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Fieldcollections $fd */
$fd = $this->getClass()->getFieldDefinition("contentElemente");
$this->contentElemente = $fd->preSetData($this, $contentElemente);
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\AccordionElement
*/
public function setLink(?\Pimcore\Model\DataObject\Data\Link $link)
{
$this->link = $link;
return $this;
}
}