<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - legacyId [input]
* - isMainRegion [checkbox]
* - isLive [checkbox]
* - name [input]
* - localizedfields [localizedfields]
* -- nameLocalized [input]
* - siteConfig [manyToOneRelation]
* - sorting [numeric]
* - contactEmail [input]
* - contactObject [manyToOneRelation]
* - pressContactObject [manyToOneRelation]
* - weatherStation [manyToOneRelation]
* - weatherLiveStation [manyToOneRelation]
* - oldPath [input]
* - demiFilterObject [manyToOneRelation]
* - alpsteinRegions [manyToManyObjectRelation]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Region\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByLegacyId($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByIsMainRegion($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByIsLive($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByName($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByNameLocalized($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getBySiteConfig($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getBySorting($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByContactEmail($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByContactObject($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByPressContactObject($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByWeatherStation($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByWeatherLiveStation($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByOldPath($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByDemiFilterObject($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Region\Listing|\Pimcore\Model\DataObject\Region|null getByAlpsteinRegions($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Region extends Concrete
{
protected $o_classId = "Region";
protected $o_className = "Region";
protected $legacyId;
protected $isMainRegion;
protected $isLive;
protected $name;
protected $localizedfields;
protected $siteConfig;
protected $sorting;
protected $contactEmail;
protected $contactObject;
protected $pressContactObject;
protected $weatherStation;
protected $weatherLiveStation;
protected $oldPath;
protected $demiFilterObject;
protected $alpsteinRegions;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Region
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get legacyId - Legacy ID
* @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 - Legacy ID
* @param string|null $legacyId
* @return \Pimcore\Model\DataObject\Region
*/
public function setLegacyId($legacyId)
{
$this->legacyId = $legacyId;
return $this;
}
/**
* Get isMainRegion - is Main Region
* @return bool|null
*/
public function getIsMainRegion()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("isMainRegion");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->isMainRegion;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set isMainRegion - is Main Region
* @param bool|null $isMainRegion
* @return \Pimcore\Model\DataObject\Region
*/
public function setIsMainRegion($isMainRegion)
{
$this->isMainRegion = $isMainRegion;
return $this;
}
/**
* Get isLive - is Live
* @return bool|null
*/
public function getIsLive()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("isLive");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->isLive;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set isLive - is Live
* @param bool|null $isLive
* @return \Pimcore\Model\DataObject\Region
*/
public function setIsLive($isLive)
{
$this->isLive = $isLive;
return $this;
}
/**
* Get name - Name
* @return string|null
*/
public function getName()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("name");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->name;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set name - Name
* @param string|null $name
* @return \Pimcore\Model\DataObject\Region
*/
public function setName($name)
{
$this->name = $name;
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 nameLocalized - Lokalisierter Name
* @return string|null
*/
public function getNameLocalized($language = null)
{
$data = $this->getLocalizedfields()->getLocalizedValue("nameLocalized", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("nameLocalized");
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\Region
*/
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 nameLocalized - Lokalisierter Name
* @param string|null $nameLocalized
* @return \Pimcore\Model\DataObject\Region
*/
public function setNameLocalized ($nameLocalized, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("nameLocalized", $nameLocalized, $language, !$isEqual);
return $this;
}
/**
* Get siteConfig - SiteConfig
* @return \Pimcore\Model\DataObject\SiteConfig|null
*/
public function getSiteConfig()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("siteConfig");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("siteConfig")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set siteConfig - SiteConfig
* @param \Pimcore\Model\DataObject\SiteConfig $siteConfig
* @return \Pimcore\Model\DataObject\Region
*/
public function setSiteConfig($siteConfig)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("siteConfig");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getSiteConfig();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $siteConfig);
if (!$isEqual) {
$this->markFieldDirty("siteConfig", true);
}
$this->siteConfig = $fd->preSetData($this, $siteConfig);
return $this;
}
/**
* Get sorting - Sorting
* @return float|null
*/
public function getSorting()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("sorting");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->sorting;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set sorting - Sorting
* @param float|null $sorting
* @return \Pimcore\Model\DataObject\Region
*/
public function setSorting($sorting)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
$fd = $this->getClass()->getFieldDefinition("sorting");
$this->sorting = $fd->preSetData($this, $sorting);
return $this;
}
/**
* Get contactEmail - Contact Email
* @return string|null
*/
public function getContactEmail()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("contactEmail");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->contactEmail;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set contactEmail - Contact Email
* @param string|null $contactEmail
* @return \Pimcore\Model\DataObject\Region
*/
public function setContactEmail($contactEmail)
{
$this->contactEmail = $contactEmail;
return $this;
}
/**
* Get contactObject - Contact
* @return \Pimcore\Model\DataObject\Contact|null
*/
public function getContactObject()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("contactObject");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("contactObject")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set contactObject - Contact
* @param \Pimcore\Model\DataObject\Contact $contactObject
* @return \Pimcore\Model\DataObject\Region
*/
public function setContactObject($contactObject)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("contactObject");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getContactObject();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $contactObject);
if (!$isEqual) {
$this->markFieldDirty("contactObject", true);
}
$this->contactObject = $fd->preSetData($this, $contactObject);
return $this;
}
/**
* Get pressContactObject - Press Contact
* @return \Pimcore\Model\DataObject\Contact|null
*/
public function getPressContactObject()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("pressContactObject");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("pressContactObject")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set pressContactObject - Press Contact
* @param \Pimcore\Model\DataObject\Contact $pressContactObject
* @return \Pimcore\Model\DataObject\Region
*/
public function setPressContactObject($pressContactObject)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("pressContactObject");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getPressContactObject();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $pressContactObject);
if (!$isEqual) {
$this->markFieldDirty("pressContactObject", true);
}
$this->pressContactObject = $fd->preSetData($this, $pressContactObject);
return $this;
}
/**
* Get weatherStation - Weather Station
* @return \Pimcore\Model\DataObject\WeatherStation|null
*/
public function getWeatherStation()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("weatherStation");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("weatherStation")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set weatherStation - Weather Station
* @param \Pimcore\Model\DataObject\WeatherStation $weatherStation
* @return \Pimcore\Model\DataObject\Region
*/
public function setWeatherStation($weatherStation)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("weatherStation");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getWeatherStation();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $weatherStation);
if (!$isEqual) {
$this->markFieldDirty("weatherStation", true);
}
$this->weatherStation = $fd->preSetData($this, $weatherStation);
return $this;
}
/**
* Get weatherLiveStation - Weather Live Station
* @return \Pimcore\Model\DataObject\WeatherLiveStation|null
*/
public function getWeatherLiveStation()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("weatherLiveStation");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("weatherLiveStation")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set weatherLiveStation - Weather Live Station
* @param \Pimcore\Model\DataObject\WeatherLiveStation $weatherLiveStation
* @return \Pimcore\Model\DataObject\Region
*/
public function setWeatherLiveStation($weatherLiveStation)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("weatherLiveStation");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getWeatherLiveStation();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $weatherLiveStation);
if (!$isEqual) {
$this->markFieldDirty("weatherLiveStation", true);
}
$this->weatherLiveStation = $fd->preSetData($this, $weatherLiveStation);
return $this;
}
/**
* Get oldPath - oldPath
* @return string|null
*/
public function getOldPath()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("oldPath");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->oldPath;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set oldPath - oldPath
* @param string|null $oldPath
* @return \Pimcore\Model\DataObject\Region
*/
public function setOldPath($oldPath)
{
$this->oldPath = $oldPath;
return $this;
}
/**
* Get demiFilterObject - Demi FilterObject
* @return \Pimcore\Model\DataObject\DemiFilterObject|null
*/
public function getDemiFilterObject()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("demiFilterObject");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("demiFilterObject")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set demiFilterObject - Demi FilterObject
* @param \Pimcore\Model\DataObject\DemiFilterObject $demiFilterObject
* @return \Pimcore\Model\DataObject\Region
*/
public function setDemiFilterObject($demiFilterObject)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("demiFilterObject");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getDemiFilterObject();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $demiFilterObject);
if (!$isEqual) {
$this->markFieldDirty("demiFilterObject", true);
}
$this->demiFilterObject = $fd->preSetData($this, $demiFilterObject);
return $this;
}
/**
* Get alpsteinRegions - AlpsteinRegions
* @return \Pimcore\Model\DataObject\AlpsteinRegion[]
*/
public function getAlpsteinRegions()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("alpsteinRegions");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("alpsteinRegions")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set alpsteinRegions - AlpsteinRegions
* @param \Pimcore\Model\DataObject\AlpsteinRegion[] $alpsteinRegions
* @return \Pimcore\Model\DataObject\Region
*/
public function setAlpsteinRegions($alpsteinRegions)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("alpsteinRegions");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getAlpsteinRegions();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $alpsteinRegions);
if (!$isEqual) {
$this->markFieldDirty("alpsteinRegions", true);
}
$this->alpsteinRegions = $fd->preSetData($this, $alpsteinRegions);
return $this;
}
}