var/classes/DataObject/FilterBlog.php line 25

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - orderKey [numeric]
  8.  * - localizedfields [localizedfields]
  9.  * -- filterName [input]
  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\FilterBlog\Listing getList(array $config = [])
  16. * @method static \Pimcore\Model\DataObject\FilterBlog\Listing|\Pimcore\Model\DataObject\FilterBlog|null getByOrderKey($value, $limit = 0, $offset = 0, $objectTypes = null)
  17. * @method static \Pimcore\Model\DataObject\FilterBlog\Listing|\Pimcore\Model\DataObject\FilterBlog|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  18. * @method static \Pimcore\Model\DataObject\FilterBlog\Listing|\Pimcore\Model\DataObject\FilterBlog|null getByFilterName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
  19. */
  20. class FilterBlog extends Concrete
  21. {
  22. protected $o_classId "9";
  23. protected $o_className "filterBlog";
  24. protected $orderKey;
  25. protected $localizedfields;
  26. /**
  27. * @param array $values
  28. * @return \Pimcore\Model\DataObject\FilterBlog
  29. */
  30. public static function create($values = array()) {
  31.     $object = new static();
  32.     $object->setValues($values);
  33.     return $object;
  34. }
  35. /**
  36. * Get orderKey - Volgorde nummer
  37. * @return float|null
  38. */
  39. public function getOrderKey()
  40. {
  41.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  42.         $preValue $this->preGetValue("orderKey");
  43.         if ($preValue !== null) {
  44.             return $preValue;
  45.         }
  46.     }
  47.     $data $this->orderKey;
  48.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  49.         return $data->getPlain();
  50.     }
  51.     return $data;
  52. }
  53. /**
  54. * Set orderKey - Volgorde nummer
  55. * @param float|null $orderKey
  56. * @return \Pimcore\Model\DataObject\FilterBlog
  57. */
  58. public function setOrderKey($orderKey)
  59. {
  60.     /** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
  61.     $fd $this->getClass()->getFieldDefinition("orderKey");
  62.     $this->orderKey $fd->preSetData($this$orderKey);
  63.     return $this;
  64. }
  65. /**
  66. * Get localizedfields - 
  67. * @return \Pimcore\Model\DataObject\Localizedfield|null
  68. */
  69. public function getLocalizedfields()
  70. {
  71.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  72.         $preValue $this->preGetValue("localizedfields");
  73.         if ($preValue !== null) {
  74.             return $preValue;
  75.         }
  76.     }
  77.     $data $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
  78.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  79.         return $data->getPlain();
  80.     }
  81.     return $data;
  82. }
  83. /**
  84. * Get filterName - Filter benaming
  85. * @return string|null
  86. */
  87. public function getFilterName($language null)
  88. {
  89.     $data $this->getLocalizedfields()->getLocalizedValue("filterName"$language);
  90.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  91.         $preValue $this->preGetValue("filterName");
  92.         if ($preValue !== null) {
  93.             return $preValue;
  94.         }
  95.     }
  96.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  97.         return $data->getPlain();
  98.     }
  99.     return $data;
  100. }
  101. /**
  102. * Set localizedfields - 
  103. * @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
  104. * @return \Pimcore\Model\DataObject\FilterBlog
  105. */
  106. public function setLocalizedfields($localizedfields)
  107. {
  108.     $hideUnpublished \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
  109.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
  110.     $currentData $this->getLocalizedfields();
  111.     \Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
  112.     $this->markFieldDirty("localizedfields"true);
  113.     $this->localizedfields $localizedfields;
  114.     return $this;
  115. }
  116. /**
  117. * Set filterName - Filter benaming
  118. * @param string|null $filterName
  119. * @return \Pimcore\Model\DataObject\FilterBlog
  120. */
  121. public function setFilterName ($filterName$language null)
  122. {
  123.     $isEqual false;
  124.     $this->getLocalizedfields()->setLocalizedValue("filterName"$filterName$language, !$isEqual);
  125.     return $this;
  126. }
  127. }