public function getCommerces($force = false)
    {
        if ($this->nb_commerce_list->isEmpty() || $force) {
            $this->nb_commerce_list->clear();
            $this->nb_commerce_list->merge(CNabuCommerce::getAllCommerces($this));
        }

        return $this->nb_commerce_list->getItems();
    }
public function getCommerces($force = false)
    {
        if ($this->nb_commerce_list->isEmpty() || $force) {
            $this->nb_commerce_list->clear();
            $this->nb_commerce_list->merge(CNabuCommerce::getAllCommerces($this));
        }

        return $this->nb_commerce_list->getItems();
    }
public function getCommerces ( $ force = false ) { if ( $ this -> nb_commerce_list -> isEmpty ( ) || $ force ) { $ this -> nb_commerce_list -> clear ( ) ; $ this -> nb_commerce_list -> merge ( CNabuCommerce :: getAllCommerces ( $ this ) ) ; } return $ this -> nb_commerce_list -> getItems ( ) ; }
Gets available Commerce instances in the list.
@param bool $force If true, forces to merge complete list from the storage.
@return array Returns an associative array where the index is the ID of each Commerce and the value
is the instance.
Gets available Commerce instances in the list .