var/classes/DataObject/Recipecategory.php line 32

Open in your IDE?
  1. <?php
  2. /**
  3. * Inheritance: no
  4. * Variants: no
  5. Fields Summary:
  6. - cat_url [input]
  7. - localizedfields [localizedfields]
  8. -- recipecategoryname [input]
  9. -- meta_title [input]
  10. -- meta_description [textarea]
  11. - recipes_schema_markup_keywords [input]
  12. */
  13. namespace Pimcore\Model\DataObject;
  14. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  15. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  16. /**
  17. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing getList(array $config = [])
  18. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByCat_url($value, $limit = 0, $offset = 0, $objectTypes = null)
  19. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  20. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByRecipecategoryname($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  21. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByMeta_title($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  22. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByMeta_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  23. * @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByRecipes_schema_markup_keywords($value, $limit = 0, $offset = 0, $objectTypes = null)
  24. */
  25. class Recipecategory extends Concrete
  26. {
  27. protected $o_classId "11";
  28. protected $o_className "recipecategory";
  29. protected $cat_url;
  30. protected $localizedfields;
  31. protected $recipes_schema_markup_keywords;
  32. /**
  33. * @param array $values
  34. * @return \Pimcore\Model\DataObject\Recipecategory
  35. */
  36. public static function create($values = array()) {
  37.     $object = new static();
  38.     $object->setValues($values);
  39.     return $object;
  40. }
  41. /**
  42. * Get cat_url - Recipe Category URL
  43. * @return string|null
  44. */
  45. public function getCat_url(): ?string
  46. {
  47.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  48.         $preValue $this->preGetValue("cat_url");
  49.         if ($preValue !== null) {
  50.             return $preValue;
  51.         }
  52.     }
  53.     $data $this->cat_url;
  54.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  55.         return $data->getPlain();
  56.     }
  57.     return $data;
  58. }
  59. /**
  60. * Set cat_url - Recipe Category URL
  61. * @param string|null $cat_url
  62. * @return \Pimcore\Model\DataObject\Recipecategory
  63. */
  64. public function setCat_url(?string $cat_url)
  65. {
  66.     $this->cat_url $cat_url;
  67.     return $this;
  68. }
  69. /**
  70. * Get localizedfields - 
  71. * @return \Pimcore\Model\DataObject\Localizedfield|null
  72. */
  73. public function getLocalizedfields(): ?\Pimcore\Model\DataObject\Localizedfield
  74. {
  75.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  76.         $preValue $this->preGetValue("localizedfields");
  77.         if ($preValue !== null) {
  78.             return $preValue;
  79.         }
  80.     }
  81.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  82.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  83.         return $data->getPlain();
  84.     }
  85.     return $data;
  86. }
  87. /**
  88. * Get recipecategoryname - Recipe Category Name
  89. * @return string|null
  90. */
  91. public function getRecipecategoryname($language null): ?string
  92. {
  93.     $data $this->getLocalizedfields()->getLocalizedValue("recipecategoryname"$language);
  94.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  95.         $preValue $this->preGetValue("recipecategoryname");
  96.         if ($preValue !== null) {
  97.             return $preValue;
  98.         }
  99.     }
  100.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  101.         return $data->getPlain();
  102.     }
  103.     return $data;
  104. }
  105. /**
  106. * Get meta_title - Meta Title
  107. * @return string|null
  108. */
  109. public function getMeta_title($language null): ?string
  110. {
  111.     $data $this->getLocalizedfields()->getLocalizedValue("meta_title"$language);
  112.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  113.         $preValue $this->preGetValue("meta_title");
  114.         if ($preValue !== null) {
  115.             return $preValue;
  116.         }
  117.     }
  118.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  119.         return $data->getPlain();
  120.     }
  121.     return $data;
  122. }
  123. /**
  124. * Get meta_description - Meta Description
  125. * @return string|null
  126. */
  127. public function getMeta_description($language null): ?string
  128. {
  129.     $data $this->getLocalizedfields()->getLocalizedValue("meta_description"$language);
  130.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  131.         $preValue $this->preGetValue("meta_description");
  132.         if ($preValue !== null) {
  133.             return $preValue;
  134.         }
  135.     }
  136.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  137.         return $data->getPlain();
  138.     }
  139.     return $data;
  140. }
  141. /**
  142. * Set localizedfields - 
  143. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  144. * @return \Pimcore\Model\DataObject\Recipecategory
  145. */
  146. public function setLocalizedfields(?\Pimcore\Model\DataObject\Localizedfield $localizedfields)
  147. {
  148.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  149.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  150.     $currentData $this->getLocalizedfields();
  151.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  152.     $this->markFieldDirty("localizedfields"true);
  153.     $this->localizedfields $localizedfields;
  154.     return $this;
  155. }
  156. /**
  157. * Set recipecategoryname - Recipe Category Name
  158. * @param string|null $recipecategoryname
  159. * @return \Pimcore\Model\DataObject\Recipecategory
  160. */
  161. public function setRecipecategoryname (?string $recipecategoryname$language null)
  162. {
  163.     $isEqual false;
  164.     $this->getLocalizedfields()->setLocalizedValue("recipecategoryname"$recipecategoryname$language, !$isEqual);
  165.     return $this;
  166. }
  167. /**
  168. * Set meta_title - Meta Title
  169. * @param string|null $meta_title
  170. * @return \Pimcore\Model\DataObject\Recipecategory
  171. */
  172. public function setMeta_title (?string $meta_title$language null)
  173. {
  174.     $isEqual false;
  175.     $this->getLocalizedfields()->setLocalizedValue("meta_title"$meta_title$language, !$isEqual);
  176.     return $this;
  177. }
  178. /**
  179. * Set meta_description - Meta Description
  180. * @param string|null $meta_description
  181. * @return \Pimcore\Model\DataObject\Recipecategory
  182. */
  183. public function setMeta_description (?string $meta_description$language null)
  184. {
  185.     $isEqual false;
  186.     $this->getLocalizedfields()->setLocalizedValue("meta_description"$meta_description$language, !$isEqual);
  187.     return $this;
  188. }
  189. /**
  190. * Get recipes_schema_markup_keywords - Recipes Schema Markup Keywords
  191. * @return string|null
  192. */
  193. public function getRecipes_schema_markup_keywords(): ?string
  194. {
  195.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  196.         $preValue $this->preGetValue("recipes_schema_markup_keywords");
  197.         if ($preValue !== null) {
  198.             return $preValue;
  199.         }
  200.     }
  201.     $data $this->recipes_schema_markup_keywords;
  202.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  203.         return $data->getPlain();
  204.     }
  205.     return $data;
  206. }
  207. /**
  208. * Set recipes_schema_markup_keywords - Recipes Schema Markup Keywords
  209. * @param string|null $recipes_schema_markup_keywords
  210. * @return \Pimcore\Model\DataObject\Recipecategory
  211. */
  212. public function setRecipes_schema_markup_keywords(?string $recipes_schema_markup_keywords)
  213. {
  214.     $this->recipes_schema_markup_keywords $recipes_schema_markup_keywords;
  215.     return $this;
  216. }
  217. }