<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - legacyId [input]
* - isLocation [checkbox]
* - notShowInEventplannerFilter [checkbox]
* - localizedfields [localizedfields]
* -- name [input]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\ConventionPartnerCategory\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\ConventionPartnerCategory\Listing|\Pimcore\Model\DataObject\ConventionPartnerCategory|null getByLegacyId($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ConventionPartnerCategory\Listing|\Pimcore\Model\DataObject\ConventionPartnerCategory|null getByIsLocation($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ConventionPartnerCategory\Listing|\Pimcore\Model\DataObject\ConventionPartnerCategory|null getByNotShowInEventplannerFilter($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ConventionPartnerCategory\Listing|\Pimcore\Model\DataObject\ConventionPartnerCategory|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\ConventionPartnerCategory\Listing|\Pimcore\Model\DataObject\ConventionPartnerCategory|null getByName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
*/
class ConventionPartnerCategory extends Concrete
{
protected $o_classId = "ConventionPartnerCategory";
protected $o_className = "ConventionPartnerCategory";
protected $legacyId;
protected $isLocation;
protected $notShowInEventplannerFilter;
protected $localizedfields;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\ConventionPartnerCategory
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get legacyId - legacyId
* @return string|null
*/
public function getLegacyId()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("legacyId");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->legacyId;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set legacyId - legacyId
* @param string|null $legacyId
* @return \Pimcore\Model\DataObject\ConventionPartnerCategory
*/
public function setLegacyId($legacyId)
{
$this->legacyId = $legacyId;
return $this;
}
/**
* Get isLocation - Is a location
* @return bool|null
*/
public function getIsLocation()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("isLocation");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->isLocation;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set isLocation - Is a location
* @param bool|null $isLocation
* @return \Pimcore\Model\DataObject\ConventionPartnerCategory
*/
public function setIsLocation($isLocation)
{
$this->isLocation = $isLocation;
return $this;
}
/**
* Get notShowInEventplannerFilter - Not Show In Eventplanner Filter
* @return bool|null
*/
public function getNotShowInEventplannerFilter()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("notShowInEventplannerFilter");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->notShowInEventplannerFilter;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set notShowInEventplannerFilter - Not Show In Eventplanner Filter
* @param bool|null $notShowInEventplannerFilter
* @return \Pimcore\Model\DataObject\ConventionPartnerCategory
*/
public function setNotShowInEventplannerFilter($notShowInEventplannerFilter)
{
$this->notShowInEventplannerFilter = $notShowInEventplannerFilter;
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 name - Name
* @return string|null
*/
public function getName($language = null)
{
$data = $this->getLocalizedfields()->getLocalizedValue("name", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("name");
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\ConventionPartnerCategory
*/
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 name - Name
* @param string|null $name
* @return \Pimcore\Model\DataObject\ConventionPartnerCategory
*/
public function setName ($name, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("name", $name, $language, !$isEqual);
return $this;
}
}