var/classes/DataObject/Testimonial.php line 32

Open in your IDE?
  1. <?php
  2. /**
  3. * Inheritance: no
  4. * Variants: no
  5. *
  6. * Fields Summary:
  7. * - testimonialImage [image]
  8. * - testimonialName [input]
  9. * - testimonialText [wysiwyg]
  10. * - firstname [input]
  11. * - lastName [input]
  12. * - company [input]
  13. * - testimonialVideo [video]
  14. */
  15. namespace Pimcore\Model\DataObject;
  16. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  17. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  18. /**
  19. * @method static \Pimcore\Model\DataObject\Testimonial\Listing getList(array $config = [])
  20. * @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByTestimonialImage($value, $limit = 0, $offset = 0, $objectTypes = null)
  21. * @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByTestimonialName($value, $limit = 0, $offset = 0, $objectTypes = null)
  22. * @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByTestimonialText($value, $limit = 0, $offset = 0, $objectTypes = null)
  23. * @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
  24. * @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByLastName($value, $limit = 0, $offset = 0, $objectTypes = null)
  25. * @method static \Pimcore\Model\DataObject\Testimonial\Listing|\Pimcore\Model\DataObject\Testimonial|null getByCompany($value, $limit = 0, $offset = 0, $objectTypes = null)
  26. */
  27. class Testimonial extends Concrete
  28. {
  29. protected $o_classId = "tes";
  30. protected $o_className = "Testimonial";
  31. protected $testimonialImage;
  32. protected $testimonialName;
  33. protected $testimonialText;
  34. protected $firstname;
  35. protected $lastName;
  36. protected $company;
  37. protected $testimonialVideo;
  38. /**
  39. * @param array $values
  40. * @return \Pimcore\Model\DataObject\Testimonial
  41. */
  42. public static function create($values = array()) {
  43. $object = new static();
  44. $object->setValues($values);
  45. return $object;
  46. }
  47. /**
  48. * Get testimonialImage - Bild
  49. * @return \Pimcore\Model\Asset\Image|null
  50. */
  51. public function getTestimonialImage(): ?\Pimcore\Model\Asset\Image
  52. {
  53. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  54. $preValue = $this->preGetValue("testimonialImage");
  55. if ($preValue !== null) {
  56. return $preValue;
  57. }
  58. }
  59. $data = $this->testimonialImage;
  60. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  61. return $data->getPlain();
  62. }
  63. return $data;
  64. }
  65. /**
  66. * Set testimonialImage - Bild
  67. * @param \Pimcore\Model\Asset\Image|null $testimonialImage
  68. * @return \Pimcore\Model\DataObject\Testimonial
  69. */
  70. public function setTestimonialImage(?\Pimcore\Model\Asset\Image $testimonialImage)
  71. {
  72. $this->testimonialImage = $testimonialImage;
  73. return $this;
  74. }
  75. /**
  76. * Get testimonialName - Name
  77. * @return string|null
  78. */
  79. public function getTestimonialName(): ?string
  80. {
  81. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  82. $preValue = $this->preGetValue("testimonialName");
  83. if ($preValue !== null) {
  84. return $preValue;
  85. }
  86. }
  87. $data = $this->testimonialName;
  88. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  89. return $data->getPlain();
  90. }
  91. return $data;
  92. }
  93. /**
  94. * Set testimonialName - Name
  95. * @param string|null $testimonialName
  96. * @return \Pimcore\Model\DataObject\Testimonial
  97. */
  98. public function setTestimonialName(?string $testimonialName)
  99. {
  100. $this->testimonialName = $testimonialName;
  101. return $this;
  102. }
  103. /**
  104. * Get testimonialText - Text
  105. * @return string|null
  106. */
  107. public function getTestimonialText(): ?string
  108. {
  109. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  110. $preValue = $this->preGetValue("testimonialText");
  111. if ($preValue !== null) {
  112. return $preValue;
  113. }
  114. }
  115. $data = $this->getClass()->getFieldDefinition("testimonialText")->preGetData($this);
  116. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  117. return $data->getPlain();
  118. }
  119. return $data;
  120. }
  121. /**
  122. * Set testimonialText - Text
  123. * @param string|null $testimonialText
  124. * @return \Pimcore\Model\DataObject\Testimonial
  125. */
  126. public function setTestimonialText(?string $testimonialText)
  127. {
  128. $this->testimonialText = $testimonialText;
  129. return $this;
  130. }
  131. /**
  132. * Get firstname - Vorname
  133. * @return string|null
  134. */
  135. public function getFirstname(): ?string
  136. {
  137. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  138. $preValue = $this->preGetValue("firstname");
  139. if ($preValue !== null) {
  140. return $preValue;
  141. }
  142. }
  143. $data = $this->firstname;
  144. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  145. return $data->getPlain();
  146. }
  147. return $data;
  148. }
  149. /**
  150. * Set firstname - Vorname
  151. * @param string|null $firstname
  152. * @return \Pimcore\Model\DataObject\Testimonial
  153. */
  154. public function setFirstname(?string $firstname)
  155. {
  156. $this->firstname = $firstname;
  157. return $this;
  158. }
  159. /**
  160. * Get lastName - Nachname
  161. * @return string|null
  162. */
  163. public function getLastName(): ?string
  164. {
  165. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  166. $preValue = $this->preGetValue("lastName");
  167. if ($preValue !== null) {
  168. return $preValue;
  169. }
  170. }
  171. $data = $this->lastName;
  172. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  173. return $data->getPlain();
  174. }
  175. return $data;
  176. }
  177. /**
  178. * Set lastName - Nachname
  179. * @param string|null $lastName
  180. * @return \Pimcore\Model\DataObject\Testimonial
  181. */
  182. public function setLastName(?string $lastName)
  183. {
  184. $this->lastName = $lastName;
  185. return $this;
  186. }
  187. /**
  188. * Get company - Firma
  189. * @return string|null
  190. */
  191. public function getCompany(): ?string
  192. {
  193. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  194. $preValue = $this->preGetValue("company");
  195. if ($preValue !== null) {
  196. return $preValue;
  197. }
  198. }
  199. $data = $this->company;
  200. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  201. return $data->getPlain();
  202. }
  203. return $data;
  204. }
  205. /**
  206. * Set company - Firma
  207. * @param string|null $company
  208. * @return \Pimcore\Model\DataObject\Testimonial
  209. */
  210. public function setCompany(?string $company)
  211. {
  212. $this->company = $company;
  213. return $this;
  214. }
  215. /**
  216. * Get testimonialVideo - Video
  217. * @return \Pimcore\Model\DataObject\Data\Video|null
  218. */
  219. public function getTestimonialVideo(): ?\Pimcore\Model\DataObject\Data\Video
  220. {
  221. if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  222. $preValue = $this->preGetValue("testimonialVideo");
  223. if ($preValue !== null) {
  224. return $preValue;
  225. }
  226. }
  227. $data = $this->testimonialVideo;
  228. if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  229. return $data->getPlain();
  230. }
  231. return $data;
  232. }
  233. /**
  234. * Set testimonialVideo - Video
  235. * @param \Pimcore\Model\DataObject\Data\Video|null $testimonialVideo
  236. * @return \Pimcore\Model\DataObject\Testimonial
  237. */
  238. public function setTestimonialVideo(?\Pimcore\Model\DataObject\Data\Video $testimonialVideo)
  239. {
  240. $this->testimonialVideo = $testimonialVideo;
  241. return $this;
  242. }
  243. }