var/classes/DataObject/Resourceinterview.php line 73

Open in your IDE?
  1. <?php
  2. /**
  3. * Inheritance: no
  4. * Variants: no
  5. Fields Summary:
  6. - localizedfields [localizedfields]
  7. -- interview_heading [input]
  8. -- interview_description [textarea]
  9. -- interview_video [video]
  10. */
  11. namespace Pimcore\Model\DataObject;
  12. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  13. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  14. /**
  15. * @method static \Pimcore\Model\DataObject\Resourceinterview\Listing getList(array $config = [])
  16. * @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  17. * @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByInterview_heading($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  18. * @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByInterview_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  19. * @method static \Pimcore\Model\DataObject\Resourceinterview\Listing|\Pimcore\Model\DataObject\Resourceinterview|null getByInterview_video($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  20. */
  21. class Resourceinterview extends Concrete
  22. {
  23. protected $o_classId "55";
  24. protected $o_className "resourceinterview";
  25. protected $localizedfields;
  26. /**
  27. * @param array $values
  28. * @return \Pimcore\Model\DataObject\Resourceinterview
  29. */
  30. public static function create($values = array()) {
  31.     $object = new static();
  32.     $object->setValues($values);
  33.     return $object;
  34. }
  35. /**
  36. * Get localizedfields - 
  37. * @return \Pimcore\Model\DataObject\Localizedfield|null
  38. */
  39. public function getLocalizedfields(): ?\Pimcore\Model\DataObject\Localizedfield
  40. {
  41.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  42.         $preValue $this->preGetValue("localizedfields");
  43.         if ($preValue !== null) {
  44.             return $preValue;
  45.         }
  46.     }
  47.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  48.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  49.         return $data->getPlain();
  50.     }
  51.     return $data;
  52. }
  53. /**
  54. * Get interview_heading - Interview Heading
  55. * @return string|null
  56. */
  57. public function getInterview_heading($language null): ?string
  58. {
  59.     $data $this->getLocalizedfields()->getLocalizedValue("interview_heading"$language);
  60.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  61.         $preValue $this->preGetValue("interview_heading");
  62.         if ($preValue !== null) {
  63.             return $preValue;
  64.         }
  65.     }
  66.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  67.         return $data->getPlain();
  68.     }
  69.     return $data;
  70. }
  71. /**
  72. * Get interview_description - Interview Description
  73. * @return string|null
  74. */
  75. public function getInterview_description($language null): ?string
  76. {
  77.     $data $this->getLocalizedfields()->getLocalizedValue("interview_description"$language);
  78.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  79.         $preValue $this->preGetValue("interview_description");
  80.         if ($preValue !== null) {
  81.             return $preValue;
  82.         }
  83.     }
  84.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  85.         return $data->getPlain();
  86.     }
  87.     return $data;
  88. }
  89. /**
  90. * Get interview_video - Interview Video
  91. * @return \Pimcore\Model\DataObject\Data\Video|null
  92. */
  93. public function getInterview_video($language null): ?\Pimcore\Model\DataObject\Data\Video
  94. {
  95.     $data $this->getLocalizedfields()->getLocalizedValue("interview_video"$language);
  96.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  97.         $preValue $this->preGetValue("interview_video");
  98.         if ($preValue !== null) {
  99.             return $preValue;
  100.         }
  101.     }
  102.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  103.         return $data->getPlain();
  104.     }
  105.     return $data;
  106. }
  107. /**
  108. * Set localizedfields - 
  109. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  110. * @return \Pimcore\Model\DataObject\Resourceinterview
  111. */
  112. public function setLocalizedfields(?\Pimcore\Model\DataObject\Localizedfield $localizedfields)
  113. {
  114.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  115.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  116.     $currentData $this->getLocalizedfields();
  117.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  118.     $this->markFieldDirty("localizedfields"true);
  119.     $this->localizedfields $localizedfields;
  120.     return $this;
  121. }
  122. /**
  123. * Set interview_heading - Interview Heading
  124. * @param string|null $interview_heading
  125. * @return \Pimcore\Model\DataObject\Resourceinterview
  126. */
  127. public function setInterview_heading (?string $interview_heading$language null)
  128. {
  129.     $isEqual false;
  130.     $this->getLocalizedfields()->setLocalizedValue("interview_heading"$interview_heading$language, !$isEqual);
  131.     return $this;
  132. }
  133. /**
  134. * Set interview_description - Interview Description
  135. * @param string|null $interview_description
  136. * @return \Pimcore\Model\DataObject\Resourceinterview
  137. */
  138. public function setInterview_description (?string $interview_description$language null)
  139. {
  140.     $isEqual false;
  141.     $this->getLocalizedfields()->setLocalizedValue("interview_description"$interview_description$language, !$isEqual);
  142.     return $this;
  143. }
  144. /**
  145. * Set interview_video - Interview Video
  146. * @param \Pimcore\Model\DataObject\Data\Video|null $interview_video
  147. * @return \Pimcore\Model\DataObject\Resourceinterview
  148. */
  149. public function setInterview_video (?\Pimcore\Model\DataObject\Data\Video $interview_video$language null)
  150. {
  151.     $isEqual false;
  152.     $this->getLocalizedfields()->setLocalizedValue("interview_video"$interview_video$language, !$isEqual);
  153.     return $this;
  154. }
  155. }