<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - salutation [input]
* - lastname [input]
* - firstname [input]
* - country [coreShopCountry]
* - state [coreShopState]
* - company [input]
* - postcode [input]
* - city [input]
* - street [input]
* - number [input]
* - phoneNumber [input]
* - addressIdentifier [coreShopAddressIdentifier]
* - comment [textarea]
* - isCompanyBill [checkbox]
* - companyName [input]
* - companyTaxNumber [input]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getBySalutation($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByLastname($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCompany($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByPostcode($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCity($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByStreet($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByNumber($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByPhoneNumber($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByComment($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByIsCompanyBill($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCompanyName($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCompanyTaxNumber($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class CoreShopAddress extends \CoreShop\Component\Address\Model\Address
{
protected $o_classId = "cs_address";
protected $o_className = "CoreShopAddress";
protected $salutation;
protected $lastname;
protected $firstname;
protected $country;
protected $state;
protected $company;
protected $postcode;
protected $city;
protected $street;
protected $number;
protected $phoneNumber;
protected $addressIdentifier;
protected $comment;
protected $isCompanyBill;
protected $companyName;
protected $companyTaxNumber;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get salutation - coreshop.address.salutation
* @return string|null
*/
public function getSalutation(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("salutation");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->salutation;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set salutation - coreshop.address.salutation
* @param string|null $salutation
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setSalutation(?string $salutation)
{
$this->salutation = $salutation;
return $this;
}
/**
* Get lastname - coreshop.address.lastname
* @return string|null
*/
public function getLastname(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("lastname");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->lastname;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set lastname - coreshop.address.lastname
* @param string|null $lastname
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setLastname(?string $lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get firstname - coreshop.address.firstname
* @return string|null
*/
public function getFirstname(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("firstname");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->firstname;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set firstname - coreshop.address.firstname
* @param string|null $firstname
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setFirstname(?string $firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get country - coreshop.address.country
* @return null|\CoreShop\Component\Address\Model\CountryInterface
*/
public function getCountry(): ?\CoreShop\Component\Address\Model\CountryInterface
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("country");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("country")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set country - coreshop.address.country
* @param null|\CoreShop\Component\Address\Model\CountryInterface $country
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setCountry(?\CoreShop\Component\Address\Model\CountryInterface $country)
{
/** @var \CoreShop\Bundle\AddressBundle\CoreExtension\Country $fd */
$fd = $this->getClass()->getFieldDefinition("country");
$this->country = $fd->preSetData($this, $country);
return $this;
}
/**
* Get state - coreshop.address.state
* @return null|\CoreShop\Component\Address\Model\StateInterface
*/
public function getState(): ?\CoreShop\Component\Address\Model\StateInterface
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("state");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("state")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set state - coreshop.address.state
* @param null|\CoreShop\Component\Address\Model\StateInterface $state
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setState(?\CoreShop\Component\Address\Model\StateInterface $state)
{
/** @var \CoreShop\Bundle\AddressBundle\CoreExtension\State $fd */
$fd = $this->getClass()->getFieldDefinition("state");
$this->state = $fd->preSetData($this, $state);
return $this;
}
/**
* Get company - coreshop.address.company
* @return string|null
*/
public function getCompany(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("company");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->company;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set company - coreshop.address.company
* @param string|null $company
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setCompany(?string $company)
{
$this->company = $company;
return $this;
}
/**
* Get postcode - coreshop.address.post_code
* @return string|null
*/
public function getPostcode(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("postcode");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->postcode;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set postcode - coreshop.address.post_code
* @param string|null $postcode
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setPostcode(?string $postcode)
{
$this->postcode = $postcode;
return $this;
}
/**
* Get city - coreshop.address.city
* @return string|null
*/
public function getCity(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("city");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->city;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set city - coreshop.address.city
* @param string|null $city
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setCity(?string $city)
{
$this->city = $city;
return $this;
}
/**
* Get street - coreshop.address.street
* @return string|null
*/
public function getStreet(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("street");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->street;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set street - coreshop.address.street
* @param string|null $street
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setStreet(?string $street)
{
$this->street = $street;
return $this;
}
/**
* Get number - coreshop.address.number
* @return string|null
*/
public function getNumber(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("number");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->number;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set number - coreshop.address.number
* @param string|null $number
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setNumber(?string $number)
{
$this->number = $number;
return $this;
}
/**
* Get phoneNumber - coreshop.address.phone_number
* @return string|null
*/
public function getPhoneNumber(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("phoneNumber");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->phoneNumber;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set phoneNumber - coreshop.address.phone_number
* @param string|null $phoneNumber
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setPhoneNumber(?string $phoneNumber)
{
$this->phoneNumber = $phoneNumber;
return $this;
}
/**
* Get addressIdentifier - coreshop.address.address_identifier
* @return null|\CoreShop\Component\Address\Model\AddressIdentifierInterface
*/
public function getAddressIdentifier(): ?\CoreShop\Component\Address\Model\AddressIdentifierInterface
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("addressIdentifier");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("addressIdentifier")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set addressIdentifier - coreshop.address.address_identifier
* @param null|\CoreShop\Component\Address\Model\AddressIdentifierInterface $addressIdentifier
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setAddressIdentifier(?\CoreShop\Component\Address\Model\AddressIdentifierInterface $addressIdentifier)
{
/** @var \CoreShop\Bundle\AddressBundle\CoreExtension\AddressIdentifier $fd */
$fd = $this->getClass()->getFieldDefinition("addressIdentifier");
$this->addressIdentifier = $fd->preSetData($this, $addressIdentifier);
return $this;
}
/**
* Get comment - Comment
* @return string|null
*/
public function getComment(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("comment");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->comment;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set comment - Comment
* @param string|null $comment
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setComment(?string $comment)
{
$this->comment = $comment;
return $this;
}
/**
* Get isCompanyBill - Céges számla
* @return bool|null
*/
public function getIsCompanyBill(): ?bool
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("isCompanyBill");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->isCompanyBill;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set isCompanyBill - Céges számla
* @param bool|null $isCompanyBill
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setIsCompanyBill(?bool $isCompanyBill)
{
$this->isCompanyBill = $isCompanyBill;
return $this;
}
/**
* Get companyName - Cégnév
* @return string|null
*/
public function getCompanyName(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("companyName");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->companyName;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set companyName - Cégnév
* @param string|null $companyName
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setCompanyName(?string $companyName)
{
$this->companyName = $companyName;
return $this;
}
/**
* Get companyTaxNumber - Adószám
* @return string|null
*/
public function getCompanyTaxNumber(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("companyTaxNumber");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->companyTaxNumber;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set companyTaxNumber - Adószám
* @param string|null $companyTaxNumber
* @return \Pimcore\Model\DataObject\CoreShopAddress
*/
public function setCompanyTaxNumber(?string $companyTaxNumber)
{
$this->companyTaxNumber = $companyTaxNumber;
return $this;
}
}