예제 #1
0
 /**
  * Sets the new ID of the item.
  *
  * @param string|null $id ID of the item
  */
 public function setId($id)
 {
     if (($this->values['id'] = \Aimeos\MShop\Common\Item\Base::checkId($this->getId(), $id)) === null) {
         $this->modified = true;
     } else {
         $this->modified = false;
     }
 }
예제 #2
0
파일: Base.php 프로젝트: aimeos/aimeos-core
 /**
  * Sets the new ID of the item.
  *
  * @param string|null $id ID of the item
  * @return \Aimeos\MShop\Common\Item\Iface Item for chaining method calls
  */
 public function setId($id)
 {
     $key = $this->prefix . 'id';
     if (($this->values[$key] = \Aimeos\MShop\Common\Item\Base::checkId($this->getId(), $id)) === null) {
         $this->modified = true;
     } else {
         $this->modified = false;
     }
     $this->values['id'] = $this->values[$key];
     return $this;
 }
예제 #3
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list[$this->prefix . 'salutation'] = $this->getSalutation();
     $list[$this->prefix . 'company'] = $this->getCompany();
     $list[$this->prefix . 'vatid'] = $this->getVatID();
     $list[$this->prefix . 'title'] = $this->getTitle();
     $list[$this->prefix . 'firstname'] = $this->getFirstname();
     $list[$this->prefix . 'lastname'] = $this->getLastname();
     $list[$this->prefix . 'address1'] = $this->getAddress1();
     $list[$this->prefix . 'address2'] = $this->getAddress2();
     $list[$this->prefix . 'address3'] = $this->getAddress3();
     $list[$this->prefix . 'postal'] = $this->getPostal();
     $list[$this->prefix . 'city'] = $this->getCity();
     $list[$this->prefix . 'state'] = $this->getState();
     $list[$this->prefix . 'countryid'] = $this->getCountryId();
     $list[$this->prefix . 'languageid'] = $this->getLanguageId();
     $list[$this->prefix . 'telephone'] = $this->getTelephone();
     $list[$this->prefix . 'telefax'] = $this->getTelefax();
     $list[$this->prefix . 'email'] = $this->getEmail();
     $list[$this->prefix . 'website'] = $this->getWebsite();
     $list[$this->prefix . 'flag'] = $this->getFlag();
     return $list;
 }
예제 #4
0
 /**
  * Tests if the object was modified.
  *
  * @return boolean True if modified, false if not
  */
 public function isModified()
 {
     return $this->modified || parent::isModified();
 }
예제 #5
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['product.property.parentid'] = $this->getParentId();
     $list['product.property.typeid'] = $this->getTypeId();
     $list['product.property.languageid'] = $this->getLanguageId();
     $list['product.property.value'] = $this->getValue();
     $list['product.property.type'] = $this->getType();
     return $list;
 }
예제 #6
0
 /**
  * Returns the item values as array.
  *
  * @return array Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['coupon.config'] = $this->getConfig();
     $list['coupon.label'] = $this->getLabel();
     $list['coupon.datestart'] = $this->getDateStart();
     $list['coupon.dateend'] = $this->getDateEnd();
     $list['coupon.provider'] = $this->getProvider();
     $list['coupon.status'] = $this->getStatus();
     return $list;
 }
예제 #7
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['locale.siteid'] = $this->getSiteId();
     $list['locale.languageid'] = $this->getLanguageId();
     $list['locale.currencyid'] = $this->getCurrencyId();
     $list['locale.position'] = $this->getPosition();
     $list['locale.status'] = $this->getStatus();
     return $list;
 }
예제 #8
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['product.stock.parentid'] = $this->getParentId();
     $list['product.stock.warehouseid'] = $this->getWarehouseId();
     $list['product.stock.stocklevel'] = $this->getStocklevel();
     $list['product.stock.dateback'] = $this->getDateBack();
     return $list;
 }
예제 #9
0
 /**
  * Returns the item values as array.
  *
  * @return array Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['customer.group.code'] = $this->getCode();
     $list['customer.group.label'] = $this->getLabel();
     return $list;
 }
예제 #10
0
 /**
  * Sets the item values from the given array.
  *
  * @param array $list Associative list of item keys and their values
  * @return array Associative list of keys and their values that are unknown
  */
 public function fromArray(array $list)
 {
     $unknown = array();
     $list = parent::fromArray($list);
     foreach ($list as $key => $value) {
         switch ($key) {
             case 'cache.id':
                 $this->setId($value);
                 break;
             case 'cache.value':
                 $this->setValue($value);
                 break;
             case 'cache.expire':
                 $this->setTimeExpire($value);
                 break;
             case 'cache.tags':
                 $this->setTags($value);
                 break;
             default:
                 $unknown[$key] = $value;
         }
     }
     return $unknown;
 }
예제 #11
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['tag.typeid'] = $this->getTypeId();
     $list['tag.languageid'] = $this->getLanguageId();
     $list['tag.label'] = $this->getLabel();
     $list['tag.type'] = $this->getType();
     return $list;
 }
예제 #12
0
파일: Base.php 프로젝트: mvnp/aimeos-core
 /**
  * Initializes the item with the given values.
  *
  * @param string $prefix Prefix for the keys returned by toArray()
  * @param array $values Associative list of key/value pairs of the item properties
  * @param array $listItems Two dimensional associative list of domain / ID / list items that implement \Aimeos\MShop\Common\Item\Lists\Iface
  * @param array $refItems Two dimensional associative list of domain / ID / domain items that implement \Aimeos\MShop\Common\Item\Iface
  */
 public function __construct($prefix, array $values = array(), array $listItems = array(), array $refItems = array())
 {
     parent::__construct($prefix, $values);
     $this->listItems = $listItems;
     $this->refItems = $refItems;
 }
예제 #13
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['product.stock.warehouse.code'] = $this->getCode();
     $list['product.stock.warehouse.label'] = $this->getLabel();
     $list['product.stock.warehouse.status'] = $this->getStatus();
     return $list;
 }
예제 #14
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['plugin.type'] = $this->getType();
     $list['plugin.typeid'] = $this->getTypeId();
     $list['plugin.label'] = $this->getLabel();
     $list['plugin.provider'] = $this->getProvider();
     $list['plugin.config'] = $this->getConfig();
     $list['plugin.status'] = $this->getStatus();
     $list['plugin.position'] = $this->getPosition();
     return $list;
 }
예제 #15
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['order.base.coupon.baseid'] = $this->getBaseId();
     $list['order.base.coupon.productid'] = $this->getProductId();
     $list['order.base.coupon.code'] = $this->getCode();
     return $list;
 }
예제 #16
0
 /**
  * Returns the item values as array.
  *
  * @return array Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['order.base.service.attribute.attrid'] = $this->getAttributeId();
     $list['order.base.service.attribute.parentid'] = $this->getParentId();
     $list['order.base.service.attribute.type'] = $this->getType();
     $list['order.base.service.attribute.name'] = $this->getName();
     $list['order.base.service.attribute.code'] = $this->getCode();
     $list['order.base.service.attribute.value'] = $this->getValue();
     return $list;
 }
예제 #17
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['coupon.code.count'] = $this->getCount();
     $list['coupon.code.code'] = $this->getCode();
     $list['coupon.code.parentid'] = $this->getParentId();
     $list['coupon.code.datestart'] = $this->getDateStart();
     $list['coupon.code.dateend'] = $this->getDateEnd();
     return $list;
 }
예제 #18
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list[$this->prefix . 'parentid'] = $this->getParentId();
     $list[$this->prefix . 'typeid'] = $this->getTypeId();
     $list[$this->prefix . 'type'] = $this->getType();
     $list[$this->prefix . 'domain'] = $this->getDomain();
     $list[$this->prefix . 'refid'] = $this->getRefId();
     $list[$this->prefix . 'datestart'] = $this->getDateStart();
     $list[$this->prefix . 'dateend'] = $this->getDateEnd();
     $list[$this->prefix . 'config'] = $this->getConfig();
     $list[$this->prefix . 'position'] = $this->getPosition();
     $list[$this->prefix . 'status'] = $this->getStatus();
     return $list;
 }
예제 #19
0
 /**
  * Returns the item values as array.
  *
  * @return array Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['log.facility'] = $this->getFacility();
     $list['log.timestamp'] = $this->getTimestamp();
     $list['log.priority'] = $this->getPriority();
     $list['log.message'] = $this->getMessage();
     $list['log.request'] = $this->getRequest();
     return $list;
 }
예제 #20
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['job.label'] = $this->getLabel();
     $list['job.method'] = $this->getMethod();
     $list['job.parameter'] = $this->getParameter();
     $list['job.result'] = $this->getResult();
     $list['job.status'] = $this->getStatus();
     return $list;
 }
예제 #21
0
 /**
  * Returns the item values as array.
  *
  * @return Associative list of item properties and their values
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list['locale.site.siteid'] = $this->getSiteId();
     $list['locale.site.code'] = $this->getCode();
     $list['locale.site.label'] = $this->getLabel();
     $list['locale.site.config'] = $this->getConfig();
     $list['locale.site.status'] = $this->getStatus();
     return $list;
 }
예제 #22
0
 /**
  * Returns an associative list of item properties.
  *
  * @return array List of item properties.
  */
 public function toArray()
 {
     $list = parent::toArray();
     $list[$this->prefix . 'code'] = $this->getCode();
     $list[$this->prefix . 'domain'] = $this->getDomain();
     $list[$this->prefix . 'label'] = $this->getLabel();
     $list[$this->prefix . 'status'] = $this->getStatus();
     return $list;
 }
예제 #23
0
파일: Base.php 프로젝트: aimeos/aimeos-core
 /**
  * Initializes the order base service item
  *
  * @param \Aimeos\MShop\Price\Item\Iface $price
  * @param array $values Values to be set on initialisation
  * @param array $attributes Attributes to be set on initialisation
  */
 public function __construct(\Aimeos\MShop\Price\Item\Iface $price, array $values = array(), array $attributes = array())
 {
     parent::__construct('order.base.service.', $values);
     \Aimeos\MW\Common\Base::checkClassList('\\Aimeos\\MShop\\Order\\Item\\Base\\Service\\Attribute\\Iface', $attributes);
     $this->attributes = $attributes;
 }