public function getProductCategories(bool $force = false) : CNabuCommerceProductCategoryList
    {
        if ($this->nb_commerce_product_category_list->isEmpty() || $force) {
            $this->nb_commerce_product_category_list->clear();
            $this->nb_commerce_product_category_list->merge(
                CNabuCommerceProductCategory::getCategoriesForCommerce($this)
            );
        }

        return $this->nb_commerce_product_category_list;
    }
public function getProductCategories(bool $force = false) : CNabuCommerceProductCategoryList
    {
        if ($this->nb_commerce_product_category_list->isEmpty() || $force) {
            $this->nb_commerce_product_category_list->clear();
            $this->nb_commerce_product_category_list->merge(
                CNabuCommerceProductCategory::getCategoriesForCommerce($this)
            );
        }

        return $this->nb_commerce_product_category_list;
    }
public function getProductCategories ( bool $ force = false ) : CNabuCommerceProductCategoryList { if ( $ this -> nb_commerce_product_category_list -> isEmpty ( ) || $ force ) { $ this -> nb_commerce_product_category_list -> clear ( ) ; $ this -> nb_commerce_product_category_list -> merge ( CNabuCommerceProductCategory :: getCategoriesForCommerce ( $ this ) ) ; } return $ this -> nb_commerce_product_category_list ; }
Gets the full list of all Product Categories in this Commerce instance.
@param bool $force If true, forces to reload list form the database storage.
@return CNabuCommerceProductCategoryList Returns a Product Category List with all Categories.
Gets the full list of all Product Categories in this Commerce instance .