<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - testimonialImage [image]
* - testimonialName [input]
* - testimonialText [wysiwyg]
* - firstname [input]
* - lastName [input]
* - company [input]
* - testimonialVideo [video]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Testimonial\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByTestimonialImage($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByTestimonialName($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByTestimonialText($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByLastName($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByCompany($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Testimonial extends Concrete
{
protected $o_classId = "tes";
protected $o_className = "Testimonial";
protected $testimonialImage;
protected $testimonialName;
protected $testimonialText;
protected $firstname;
protected $lastName;
protected $company;
protected $testimonialVideo;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Testimonial
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get testimonialImage - Bild
* @return \Pimcore\Model\Asset\Image|null
*/
public function getTestimonialImage(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("testimonialImage");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->testimonialImage;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set testimonialImage - Bild
* @param \Pimcore\Model\Asset\Image|null $testimonialImage
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setTestimonialImage(?\Pimcore\Model\Asset\Image $testimonialImage)
{
$this->testimonialImage = $testimonialImage;
return $this;
}
/**
* Get testimonialName - Name
* @return string|null
*/
public function getTestimonialName(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("testimonialName");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->testimonialName;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set testimonialName - Name
* @param string|null $testimonialName
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setTestimonialName(?string $testimonialName)
{
$this->testimonialName = $testimonialName;
return $this;
}
/**
* Get testimonialText - Text
* @return string|null
*/
public function getTestimonialText(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("testimonialText");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("testimonialText")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set testimonialText - Text
* @param string|null $testimonialText
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setTestimonialText(?string $testimonialText)
{
$this->testimonialText = $testimonialText;
return $this;
}
/**
* Get firstname - Vorname
* @return string|null
*/
public function getFirstname(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("firstname");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->firstname;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set firstname - Vorname
* @param string|null $firstname
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setFirstname(?string $firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get lastName - Nachname
* @return string|null
*/
public function getLastName(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("lastName");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->lastName;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set lastName - Nachname
* @param string|null $lastName
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setLastName(?string $lastName)
{
$this->lastName = $lastName;
return $this;
}
/**
* Get company - Firma
* @return string|null
*/
public function getCompany(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("company");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->company;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set company - Firma
* @param string|null $company
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setCompany(?string $company)
{
$this->company = $company;
return $this;
}
/**
* Get testimonialVideo - Video
* @return \Pimcore\Model\DataObject\Data\Video|null
*/
public function getTestimonialVideo(): ?\Pimcore\Model\DataObject\Data\Video
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("testimonialVideo");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->testimonialVideo;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set testimonialVideo - Video
* @param \Pimcore\Model\DataObject\Data\Video|null $testimonialVideo
* @return \Pimcore\Model\DataObject\Testimonial
*/
public function setTestimonialVideo(?\Pimcore\Model\DataObject\Data\Video $testimonialVideo)
{
$this->testimonialVideo = $testimonialVideo;
return $this;
}
}