src/Controllers/Product.php
/**
     * Map this object properties to an array to insert/update a moloni document
     * @return array
     */
Map this object properties to an array to insert/update a moloni document
@return array
Map this object properties to an array to insert / update a moloni document @return array
private function mapPropsToValues()
    {
        $values = [];
        $values['product_id'] = $this->product_id;
        $values['category_id'] = $this->category_id;
        $values['type'] = $this->type;
        $values['reference'] = $this->reference;
        $values['name'] = $this->name;
        $values['summary'] = $this->summary;
        if (!empty($this->ean)) {
            $values['ean'] = $this->ean;
        }
        $values['price'] = $this->price;
        $values['unit_id'] = $this->unit_id;
        $values['has_stock'] = $this->has_stock;
        $values['stock'] = $this->stock;
        $values['at_product_category'] = $this->at_product_category;
        $values['exemption_reason'] = $this->exemption_reason;
        $values['taxes'] = $this->taxes;
        $values['visibility_id'] = $this->visibility_id;
        return $values;
    }
private function mapPropsToValues ( ) { $ values = [ ] ; $ values [ 'product_id' ] = $ this -> product_id ; $ values [ 'category_id' ] = $ this -> category_id ; $ values [ 'type' ] = $ this -> type ; $ values [ 'reference' ] = $ this -> reference ; $ values [ 'name' ] = $ this -> name ; $ values [ 'summary' ] = $ this -> summary ; if ( ! empty ( $ this -> ean ) ) { $ values [ 'ean' ] = $ this -> ean ; } $ values [ 'price' ] = $ this -> price ; $ values [ 'unit_id' ] = $ this -> unit_id ; $ values [ 'has_stock' ] = $ this -> has_stock ; $ values [ 'stock' ] = $ this -> stock ; $ values [ 'at_product_category' ] = $ this -> at_product_category ; $ values [ 'exemption_reason' ] = $ this -> exemption_reason ; $ values [ 'taxes' ] = $ this -> taxes ; $ values [ 'visibility_id' ] = $ this -> visibility_id ; return $ values ; }
Map this object properties to an array to insert/update a moloni document
 @return array
Map this object properties to an array to insert / update a moloni document @return array
/** EAN is created from an external plugin so avoid to update it */