<?php
/**
* Inheritance: no
* Variants: no
Fields Summary:
- localizedfields [localizedfields]
-- interview_heading [input]
-- interview_description [textarea]
-- interview_video [video]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Resourceinterview\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByInterview_heading($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByInterview_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByInterview_video($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Resourceinterview extends Concrete
{
protected $o_classId = "55";
protected $o_className = "resourceinterview";
protected $localizedfields;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Resourceinterview
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get localizedfields -
* @return \Pimcore\Model\DataObject\Localizedfield|null
*/
public function getLocalizedfields(): ?\Pimcore\Model\DataObject\Localizedfield
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("localizedfields");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Get interview_heading - Interview Heading
* @return string|null
*/
public function getInterview_heading($language = null): ?string
{
$data = $this->getLocalizedfields()->getLocalizedValue("interview_heading", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("interview_heading");
if ($preValue !== null) {
return $preValue;
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Get interview_description - Interview Description
* @return string|null
*/
public function getInterview_description($language = null): ?string
{
$data = $this->getLocalizedfields()->getLocalizedValue("interview_description", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("interview_description");
if ($preValue !== null) {
return $preValue;
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Get interview_video - Interview Video
* @return \Pimcore\Model\DataObject\Data\Video|null
*/
public function getInterview_video($language = null): ?\Pimcore\Model\DataObject\Data\Video
{
$data = $this->getLocalizedfields()->getLocalizedValue("interview_video", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("interview_video");
if ($preValue !== null) {
return $preValue;
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set localizedfields -
* @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
* @return \Pimcore\Model\DataObject\Resourceinterview
*/
public function setLocalizedfields(?\Pimcore\Model\DataObject\Localizedfield $localizedfields)
{
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getLocalizedfields();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$this->markFieldDirty("localizedfields", true);
$this->localizedfields = $localizedfields;
return $this;
}
/**
* Set interview_heading - Interview Heading
* @param string|null $interview_heading
* @return \Pimcore\Model\DataObject\Resourceinterview
*/
public function setInterview_heading (?string $interview_heading, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("interview_heading", $interview_heading, $language, !$isEqual);
return $this;
}
/**
* Set interview_description - Interview Description
* @param string|null $interview_description
* @return \Pimcore\Model\DataObject\Resourceinterview
*/
public function setInterview_description (?string $interview_description, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("interview_description", $interview_description, $language, !$isEqual);
return $this;
}
/**
* Set interview_video - Interview Video
* @param \Pimcore\Model\DataObject\Data\Video|null $interview_video
* @return \Pimcore\Model\DataObject\Resourceinterview
*/
public function setInterview_video (?\Pimcore\Model\DataObject\Data\Video $interview_video, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("interview_video", $interview_video, $language, !$isEqual);
return $this;
}
}