<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - alpsteinId [input]
* - generalSolutionsId [input]
* - localizedfields [localizedfields]
* -- name [input]
* - regionType [select]
* - hasTour [checkbox]
* - bbox [geobounds]
* - level [numeric]
* - subRegions [manyToManyObjectRelation]
* - category [manyToOneRelation]
* - alpsteinKey [manyToManyRelation]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByAlpsteinId($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByGeneralSolutionsId($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByName($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByRegionType($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByHasTour($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByLevel($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getBySubRegions($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByCategory($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\AlpsteinRegion\Listing|\Pimcore\Model\DataObject\AlpsteinRegion|null getByAlpsteinKey($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class AlpsteinRegion extends Concrete
{
protected $o_classId = "AlpsteinRegion";
protected $o_className = "AlpsteinRegion";
protected $alpsteinId;
protected $generalSolutionsId;
protected $localizedfields;
protected $regionType;
protected $hasTour;
protected $bbox;
protected $level;
protected $subRegions;
protected $category;
protected $alpsteinKey;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get alpsteinId - Alpstein ID
* @return string|null
*/
public function getAlpsteinId()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("alpsteinId");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->alpsteinId;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set alpsteinId - Alpstein ID
* @param string|null $alpsteinId
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setAlpsteinId($alpsteinId)
{
$this->alpsteinId = $alpsteinId;
return $this;
}
/**
* Get generalSolutionsId - General Solutions ID
* @return string|null
*/
public function getGeneralSolutionsId()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("generalSolutionsId");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->generalSolutionsId;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set generalSolutionsId - General Solutions ID
* @param string|null $generalSolutionsId
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setGeneralSolutionsId($generalSolutionsId)
{
$this->generalSolutionsId = $generalSolutionsId;
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\AlpsteinRegion
*/
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\AlpsteinRegion
*/
public function setName ($name, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("name", $name, $language, !$isEqual);
return $this;
}
/**
* Get regionType - Region Type
* @return string|null
*/
public function getRegionType()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("regionType");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->regionType;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set regionType - Region Type
* @param string|null $regionType
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setRegionType($regionType)
{
$this->regionType = $regionType;
return $this;
}
/**
* Get hasTour - has Tour
* @return bool|null
*/
public function getHasTour()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("hasTour");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->hasTour;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set hasTour - has Tour
* @param bool|null $hasTour
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setHasTour($hasTour)
{
$this->hasTour = $hasTour;
return $this;
}
/**
* Get bbox - bbox
* @return \Pimcore\Model\DataObject\Data\Geobounds|null
*/
public function getBbox()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("bbox");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->bbox;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set bbox - bbox
* @param \Pimcore\Model\DataObject\Data\Geobounds|null $bbox
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setBbox($bbox)
{
$this->bbox = $bbox;
return $this;
}
/**
* Get level - Level
* @return float|null
*/
public function getLevel()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("level");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->level;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set level - Level
* @param float|null $level
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setLevel($level)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\Numeric $fd */
$fd = $this->getClass()->getFieldDefinition("level");
$this->level = $fd->preSetData($this, $level);
return $this;
}
/**
* Get subRegions - Sub Regions
* @return \Pimcore\Model\DataObject\AlpsteinRegion[]
*/
public function getSubRegions()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("subRegions");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("subRegions")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set subRegions - Sub Regions
* @param \Pimcore\Model\DataObject\AlpsteinRegion[] $subRegions
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setSubRegions($subRegions)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation $fd */
$fd = $this->getClass()->getFieldDefinition("subRegions");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getSubRegions();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $subRegions);
if (!$isEqual) {
$this->markFieldDirty("subRegions", true);
}
$this->subRegions = $fd->preSetData($this, $subRegions);
return $this;
}
/**
* Get category - Category
* @return \Pimcore\Model\DataObject\AlpsteinRegionCategory|null
*/
public function getCategory()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("category");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("category")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set category - Category
* @param \Pimcore\Model\DataObject\AlpsteinRegionCategory $category
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setCategory($category)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToOneRelation $fd */
$fd = $this->getClass()->getFieldDefinition("category");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getCategory();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $category);
if (!$isEqual) {
$this->markFieldDirty("category", true);
}
$this->category = $fd->preSetData($this, $category);
return $this;
}
/**
* Get alpsteinKey - Alpstein Key
* @return \Pimcore\Model\DataObject\AlpsteinKey[]
*/
public function getAlpsteinKey()
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("alpsteinKey");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("alpsteinKey")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set alpsteinKey - Alpstein Key
* @param \Pimcore\Model\DataObject\AlpsteinKey[] $alpsteinKey
* @return \Pimcore\Model\DataObject\AlpsteinRegion
*/
public function setAlpsteinKey($alpsteinKey)
{
/** @var \Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation $fd */
$fd = $this->getClass()->getFieldDefinition("alpsteinKey");
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getAlpsteinKey();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$isEqual = $fd->isEqual($currentData, $alpsteinKey);
if (!$isEqual) {
$this->markFieldDirty("alpsteinKey", true);
}
$this->alpsteinKey = $fd->preSetData($this, $alpsteinKey);
return $this;
}
}