var/classes/DataObject/CoreShopAddress.php line 209

Open in your IDE?
  1. <?php
  2. /**
  3.  * Inheritance: no
  4.  * Variants: no
  5.  *
  6.  * Fields Summary:
  7.  * - salutation [input]
  8.  * - lastname [input]
  9.  * - firstname [input]
  10.  * - country [coreShopCountry]
  11.  * - state [coreShopState]
  12.  * - company [input]
  13.  * - postcode [input]
  14.  * - city [input]
  15.  * - street [input]
  16.  * - number [input]
  17.  * - phoneNumber [input]
  18.  * - addressIdentifier [coreShopAddressIdentifier]
  19.  * - comment [textarea]
  20.  * - isCompanyBill [checkbox]
  21.  * - companyName [input]
  22.  * - companyTaxNumber [input]
  23.  */
  24. namespace Pimcore\Model\DataObject;
  25. use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
  26. use Pimcore\Model\DataObject\PreGetValueHookInterface;
  27. /**
  28. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing getList(array $config = [])
  29. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getBySalutation($value, $limit = 0, $offset = 0, $objectTypes = null)
  30. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByLastname($value, $limit = 0, $offset = 0, $objectTypes = null)
  31. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
  32. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCompany($value, $limit = 0, $offset = 0, $objectTypes = null)
  33. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByPostcode($value, $limit = 0, $offset = 0, $objectTypes = null)
  34. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCity($value, $limit = 0, $offset = 0, $objectTypes = null)
  35. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByStreet($value, $limit = 0, $offset = 0, $objectTypes = null)
  36. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByNumber($value, $limit = 0, $offset = 0, $objectTypes = null)
  37. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByPhoneNumber($value, $limit = 0, $offset = 0, $objectTypes = null)
  38. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByComment($value, $limit = 0, $offset = 0, $objectTypes = null)
  39. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByIsCompanyBill($value, $limit = 0, $offset = 0, $objectTypes = null)
  40. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCompanyName($value, $limit = 0, $offset = 0, $objectTypes = null)
  41. * @method static \Pimcore\Model\DataObject\CoreShopAddress\Listing|\Pimcore\Model\DataObject\CoreShopAddress|null getByCompanyTaxNumber($value, $limit = 0, $offset = 0, $objectTypes = null)
  42. */
  43. class CoreShopAddress extends \CoreShop\Component\Address\Model\Address
  44. {
  45. protected $o_classId "cs_address";
  46. protected $o_className "CoreShopAddress";
  47. protected $salutation;
  48. protected $lastname;
  49. protected $firstname;
  50. protected $country;
  51. protected $state;
  52. protected $company;
  53. protected $postcode;
  54. protected $city;
  55. protected $street;
  56. protected $number;
  57. protected $phoneNumber;
  58. protected $addressIdentifier;
  59. protected $comment;
  60. protected $isCompanyBill;
  61. protected $companyName;
  62. protected $companyTaxNumber;
  63. /**
  64. * @param array $values
  65. * @return \Pimcore\Model\DataObject\CoreShopAddress
  66. */
  67. public static function create($values = array()) {
  68.     $object = new static();
  69.     $object->setValues($values);
  70.     return $object;
  71. }
  72. /**
  73. * Get salutation - coreshop.address.salutation
  74. * @return string|null
  75. */
  76. public function getSalutation(): ?string
  77. {
  78.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  79.         $preValue $this->preGetValue("salutation");
  80.         if ($preValue !== null) {
  81.             return $preValue;
  82.         }
  83.     }
  84.     $data $this->salutation;
  85.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  86.         return $data->getPlain();
  87.     }
  88.     return $data;
  89. }
  90. /**
  91. * Set salutation - coreshop.address.salutation
  92. * @param string|null $salutation
  93. * @return \Pimcore\Model\DataObject\CoreShopAddress
  94. */
  95. public function setSalutation(?string $salutation)
  96. {
  97.     $this->salutation $salutation;
  98.     return $this;
  99. }
  100. /**
  101. * Get lastname - coreshop.address.lastname
  102. * @return string|null
  103. */
  104. public function getLastname(): ?string
  105. {
  106.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  107.         $preValue $this->preGetValue("lastname");
  108.         if ($preValue !== null) {
  109.             return $preValue;
  110.         }
  111.     }
  112.     $data $this->lastname;
  113.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  114.         return $data->getPlain();
  115.     }
  116.     return $data;
  117. }
  118. /**
  119. * Set lastname - coreshop.address.lastname
  120. * @param string|null $lastname
  121. * @return \Pimcore\Model\DataObject\CoreShopAddress
  122. */
  123. public function setLastname(?string $lastname)
  124. {
  125.     $this->lastname $lastname;
  126.     return $this;
  127. }
  128. /**
  129. * Get firstname - coreshop.address.firstname
  130. * @return string|null
  131. */
  132. public function getFirstname(): ?string
  133. {
  134.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  135.         $preValue $this->preGetValue("firstname");
  136.         if ($preValue !== null) {
  137.             return $preValue;
  138.         }
  139.     }
  140.     $data $this->firstname;
  141.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  142.         return $data->getPlain();
  143.     }
  144.     return $data;
  145. }
  146. /**
  147. * Set firstname - coreshop.address.firstname
  148. * @param string|null $firstname
  149. * @return \Pimcore\Model\DataObject\CoreShopAddress
  150. */
  151. public function setFirstname(?string $firstname)
  152. {
  153.     $this->firstname $firstname;
  154.     return $this;
  155. }
  156. /**
  157. * Get country - coreshop.address.country
  158. * @return null|\CoreShop\Component\Address\Model\CountryInterface
  159. */
  160. public function getCountry(): ?\CoreShop\Component\Address\Model\CountryInterface
  161. {
  162.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  163.         $preValue $this->preGetValue("country");
  164.         if ($preValue !== null) {
  165.             return $preValue;
  166.         }
  167.     }
  168.     $data $this->getClass()->getFieldDefinition("country")->preGetData($this);
  169.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  170.         return $data->getPlain();
  171.     }
  172.     return $data;
  173. }
  174. /**
  175. * Set country - coreshop.address.country
  176. * @param null|\CoreShop\Component\Address\Model\CountryInterface $country
  177. * @return \Pimcore\Model\DataObject\CoreShopAddress
  178. */
  179. public function setCountry(?\CoreShop\Component\Address\Model\CountryInterface $country)
  180. {
  181.     /** @var \CoreShop\Bundle\AddressBundle\CoreExtension\Country $fd */
  182.     $fd $this->getClass()->getFieldDefinition("country");
  183.     $this->country $fd->preSetData($this$country);
  184.     return $this;
  185. }
  186. /**
  187. * Get state - coreshop.address.state
  188. * @return null|\CoreShop\Component\Address\Model\StateInterface
  189. */
  190. public function getState(): ?\CoreShop\Component\Address\Model\StateInterface
  191. {
  192.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  193.         $preValue $this->preGetValue("state");
  194.         if ($preValue !== null) {
  195.             return $preValue;
  196.         }
  197.     }
  198.     $data $this->getClass()->getFieldDefinition("state")->preGetData($this);
  199.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  200.         return $data->getPlain();
  201.     }
  202.     return $data;
  203. }
  204. /**
  205. * Set state - coreshop.address.state
  206. * @param null|\CoreShop\Component\Address\Model\StateInterface $state
  207. * @return \Pimcore\Model\DataObject\CoreShopAddress
  208. */
  209. public function setState(?\CoreShop\Component\Address\Model\StateInterface $state)
  210. {
  211.     /** @var \CoreShop\Bundle\AddressBundle\CoreExtension\State $fd */
  212.     $fd $this->getClass()->getFieldDefinition("state");
  213.     $this->state $fd->preSetData($this$state);
  214.     return $this;
  215. }
  216. /**
  217. * Get company - coreshop.address.company
  218. * @return string|null
  219. */
  220. public function getCompany(): ?string
  221. {
  222.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  223.         $preValue $this->preGetValue("company");
  224.         if ($preValue !== null) {
  225.             return $preValue;
  226.         }
  227.     }
  228.     $data $this->company;
  229.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  230.         return $data->getPlain();
  231.     }
  232.     return $data;
  233. }
  234. /**
  235. * Set company - coreshop.address.company
  236. * @param string|null $company
  237. * @return \Pimcore\Model\DataObject\CoreShopAddress
  238. */
  239. public function setCompany(?string $company)
  240. {
  241.     $this->company $company;
  242.     return $this;
  243. }
  244. /**
  245. * Get postcode - coreshop.address.post_code
  246. * @return string|null
  247. */
  248. public function getPostcode(): ?string
  249. {
  250.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  251.         $preValue $this->preGetValue("postcode");
  252.         if ($preValue !== null) {
  253.             return $preValue;
  254.         }
  255.     }
  256.     $data $this->postcode;
  257.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  258.         return $data->getPlain();
  259.     }
  260.     return $data;
  261. }
  262. /**
  263. * Set postcode - coreshop.address.post_code
  264. * @param string|null $postcode
  265. * @return \Pimcore\Model\DataObject\CoreShopAddress
  266. */
  267. public function setPostcode(?string $postcode)
  268. {
  269.     $this->postcode $postcode;
  270.     return $this;
  271. }
  272. /**
  273. * Get city - coreshop.address.city
  274. * @return string|null
  275. */
  276. public function getCity(): ?string
  277. {
  278.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  279.         $preValue $this->preGetValue("city");
  280.         if ($preValue !== null) {
  281.             return $preValue;
  282.         }
  283.     }
  284.     $data $this->city;
  285.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  286.         return $data->getPlain();
  287.     }
  288.     return $data;
  289. }
  290. /**
  291. * Set city - coreshop.address.city
  292. * @param string|null $city
  293. * @return \Pimcore\Model\DataObject\CoreShopAddress
  294. */
  295. public function setCity(?string $city)
  296. {
  297.     $this->city $city;
  298.     return $this;
  299. }
  300. /**
  301. * Get street - coreshop.address.street
  302. * @return string|null
  303. */
  304. public function getStreet(): ?string
  305. {
  306.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  307.         $preValue $this->preGetValue("street");
  308.         if ($preValue !== null) {
  309.             return $preValue;
  310.         }
  311.     }
  312.     $data $this->street;
  313.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  314.         return $data->getPlain();
  315.     }
  316.     return $data;
  317. }
  318. /**
  319. * Set street - coreshop.address.street
  320. * @param string|null $street
  321. * @return \Pimcore\Model\DataObject\CoreShopAddress
  322. */
  323. public function setStreet(?string $street)
  324. {
  325.     $this->street $street;
  326.     return $this;
  327. }
  328. /**
  329. * Get number - coreshop.address.number
  330. * @return string|null
  331. */
  332. public function getNumber(): ?string
  333. {
  334.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  335.         $preValue $this->preGetValue("number");
  336.         if ($preValue !== null) {
  337.             return $preValue;
  338.         }
  339.     }
  340.     $data $this->number;
  341.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  342.         return $data->getPlain();
  343.     }
  344.     return $data;
  345. }
  346. /**
  347. * Set number - coreshop.address.number
  348. * @param string|null $number
  349. * @return \Pimcore\Model\DataObject\CoreShopAddress
  350. */
  351. public function setNumber(?string $number)
  352. {
  353.     $this->number $number;
  354.     return $this;
  355. }
  356. /**
  357. * Get phoneNumber - coreshop.address.phone_number
  358. * @return string|null
  359. */
  360. public function getPhoneNumber(): ?string
  361. {
  362.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  363.         $preValue $this->preGetValue("phoneNumber");
  364.         if ($preValue !== null) {
  365.             return $preValue;
  366.         }
  367.     }
  368.     $data $this->phoneNumber;
  369.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  370.         return $data->getPlain();
  371.     }
  372.     return $data;
  373. }
  374. /**
  375. * Set phoneNumber - coreshop.address.phone_number
  376. * @param string|null $phoneNumber
  377. * @return \Pimcore\Model\DataObject\CoreShopAddress
  378. */
  379. public function setPhoneNumber(?string $phoneNumber)
  380. {
  381.     $this->phoneNumber $phoneNumber;
  382.     return $this;
  383. }
  384. /**
  385. * Get addressIdentifier - coreshop.address.address_identifier
  386. * @return null|\CoreShop\Component\Address\Model\AddressIdentifierInterface
  387. */
  388. public function getAddressIdentifier(): ?\CoreShop\Component\Address\Model\AddressIdentifierInterface
  389. {
  390.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  391.         $preValue $this->preGetValue("addressIdentifier");
  392.         if ($preValue !== null) {
  393.             return $preValue;
  394.         }
  395.     }
  396.     $data $this->getClass()->getFieldDefinition("addressIdentifier")->preGetData($this);
  397.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  398.         return $data->getPlain();
  399.     }
  400.     return $data;
  401. }
  402. /**
  403. * Set addressIdentifier - coreshop.address.address_identifier
  404. * @param null|\CoreShop\Component\Address\Model\AddressIdentifierInterface $addressIdentifier
  405. * @return \Pimcore\Model\DataObject\CoreShopAddress
  406. */
  407. public function setAddressIdentifier(?\CoreShop\Component\Address\Model\AddressIdentifierInterface $addressIdentifier)
  408. {
  409.     /** @var \CoreShop\Bundle\AddressBundle\CoreExtension\AddressIdentifier $fd */
  410.     $fd $this->getClass()->getFieldDefinition("addressIdentifier");
  411.     $this->addressIdentifier $fd->preSetData($this$addressIdentifier);
  412.     return $this;
  413. }
  414. /**
  415. * Get comment - Comment
  416. * @return string|null
  417. */
  418. public function getComment(): ?string
  419. {
  420.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  421.         $preValue $this->preGetValue("comment");
  422.         if ($preValue !== null) {
  423.             return $preValue;
  424.         }
  425.     }
  426.     $data $this->comment;
  427.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  428.         return $data->getPlain();
  429.     }
  430.     return $data;
  431. }
  432. /**
  433. * Set comment - Comment
  434. * @param string|null $comment
  435. * @return \Pimcore\Model\DataObject\CoreShopAddress
  436. */
  437. public function setComment(?string $comment)
  438. {
  439.     $this->comment $comment;
  440.     return $this;
  441. }
  442. /**
  443. * Get isCompanyBill - Céges számla
  444. * @return bool|null
  445. */
  446. public function getIsCompanyBill(): ?bool
  447. {
  448.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  449.         $preValue $this->preGetValue("isCompanyBill");
  450.         if ($preValue !== null) {
  451.             return $preValue;
  452.         }
  453.     }
  454.     $data $this->isCompanyBill;
  455.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  456.         return $data->getPlain();
  457.     }
  458.     return $data;
  459. }
  460. /**
  461. * Set isCompanyBill - Céges számla
  462. * @param bool|null $isCompanyBill
  463. * @return \Pimcore\Model\DataObject\CoreShopAddress
  464. */
  465. public function setIsCompanyBill(?bool $isCompanyBill)
  466. {
  467.     $this->isCompanyBill $isCompanyBill;
  468.     return $this;
  469. }
  470. /**
  471. * Get companyName - Cégnév
  472. * @return string|null
  473. */
  474. public function getCompanyName(): ?string
  475. {
  476.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  477.         $preValue $this->preGetValue("companyName");
  478.         if ($preValue !== null) {
  479.             return $preValue;
  480.         }
  481.     }
  482.     $data $this->companyName;
  483.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  484.         return $data->getPlain();
  485.     }
  486.     return $data;
  487. }
  488. /**
  489. * Set companyName - Cégnév
  490. * @param string|null $companyName
  491. * @return \Pimcore\Model\DataObject\CoreShopAddress
  492. */
  493. public function setCompanyName(?string $companyName)
  494. {
  495.     $this->companyName $companyName;
  496.     return $this;
  497. }
  498. /**
  499. * Get companyTaxNumber - Adószám
  500. * @return string|null
  501. */
  502. public function getCompanyTaxNumber(): ?string
  503. {
  504.     if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
  505.         $preValue $this->preGetValue("companyTaxNumber");
  506.         if ($preValue !== null) {
  507.             return $preValue;
  508.         }
  509.     }
  510.     $data $this->companyTaxNumber;
  511.     if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
  512.         return $data->getPlain();
  513.     }
  514.     return $data;
  515. }
  516. /**
  517. * Set companyTaxNumber - Adószám
  518. * @param string|null $companyTaxNumber
  519. * @return \Pimcore\Model\DataObject\CoreShopAddress
  520. */
  521. public function setCompanyTaxNumber(?string $companyTaxNumber)
  522. {
  523.     $this->companyTaxNumber $companyTaxNumber;
  524.     return $this;
  525. }
  526. }