public function newProductCategory(string $key = null, int $order = 1) : CNabuCommerceProductCategory
    {
        $nb_commerce_product_category = $this->isBuiltIn()
                                      ? new CNabuBuiltInCommerceProductCategory()
                                      : new CNabuCommerceProductCategory()
        ;

        $nb_commerce_product_category->setKey($key);
        $nb_commerce_product_category->setOrder($order);

        return $this->addProductCategoryObject($nb_commerce_product_category);
    }
public function newProductCategory(string $key = null, int $order = 1) : CNabuCommerceProductCategory
    {
        $nb_commerce_product_category = $this->isBuiltIn()
                                      ? new CNabuBuiltInCommerceProductCategory()
                                      : new CNabuCommerceProductCategory()
        ;

        $nb_commerce_product_category->setKey($key);
        $nb_commerce_product_category->setOrder($order);

        return $this->addProductCategoryObject($nb_commerce_product_category);
    }
public function newProductCategory ( string $ key = null , int $ order = 1 ) : CNabuCommerceProductCategory { $ nb_commerce_product_category = $ this -> isBuiltIn ( ) ? new CNabuBuiltInCommerceProductCategory ( ) : new CNabuCommerceProductCategory ( ) ; $ nb_commerce_product_category -> setKey ( $ key ) ; $ nb_commerce_product_category -> setOrder ( $ order ) ; return $ this -> addProductCategoryObject ( $ nb_commerce_product_category ) ; }
Creates a new Product Category instance.
@param string|null $key Key to identify the Category.
@param int $order Order of the Category.
@return CNabuCommerceProductCategory Returns a valid instance.
Creates a new Product Category instance .