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; }
/** * 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()); }
public function __toString() { $name = $this->getName(); $parent = parent::__toString(); return $name ?: $parent; }