<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - orderKey [numeric]
* - localizedfields [localizedfields]
* -- filterName [input]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\FilterBlog\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\FilterBlog\Listing|\Pimcore\Model\DataObject\FilterBlog|null getByOrderKey($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\FilterBlog\Listing|\Pimcore\Model\DataObject\FilterBlog|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\FilterBlog\Listing|\Pimcore\Model\DataObject\FilterBlog|null getByFilterName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
*/
class FilterBlog extends Concrete
{
protected $o_classId = "9";
protected $o_className = "filterBlog";
protected $orderKey;
protected $localizedfields;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\FilterBlog
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get orderKey - Volgorde nummer
* @return float|null
*/
public function getOrderKey()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("orderKey");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->orderKey;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set orderKey - Volgorde nummer
* @param float|null $orderKey
* @return \Pimcore\Model\DataObject\FilterBlog
*/
public function setOrderKey($orderKey)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
$fd = $this->getClass()->getFieldDefinition("orderKey");
$this->orderKey = $fd->preSetData($this, $orderKey);
return $this;
}
/**
* Get localizedfields -
* @return \Pimcore\Model\DataObject\Localizedfield|null
*/
public function getLocalizedfields()
{
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 filterName - Filter benaming
* @return string|null
*/
public function getFilterName($language = null)
{
$data = $this->getLocalizedfields()->getLocalizedValue("filterName", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("filterName");
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\FilterBlog
*/
public function setLocalizedfields($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 filterName - Filter benaming
* @param string|null $filterName
* @return \Pimcore\Model\DataObject\FilterBlog
*/
public function setFilterName ($filterName, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("filterName", $filterName, $language, !$isEqual);
return $this;
}
}