Пример #1
0
 public function extract(ProductModel $product)
 {
     $data['product_id'] = $product->getProductId();
     $data['name'] = $product->getName();
     $data['description'] = $product->getDescription();
     $data['product_type_id'] = $product->getProductTypeId();
     $data['item_number'] = $product->getItemNumber();
     $data['manufacturer_id'] = $product->getManufacturerId();
     return $data;
 }
Пример #2
0
 /**
  * this will render the javascript/etc needed
  * to bring back the uoms, once a builder is configured.
  */
 public function builder(\SpeckCatalog\Model\Product $product)
 {
     $builder = json_encode($product->getBuilder());
 }
Пример #3
0
 public function __toString()
 {
     $name = $this->getName();
     $parent = parent::__toString();
     return $name ?: $parent;
 }