Elcodi\Store\ProductBundle\Services\StoreCategoryTree::reload PHP Метод

reload() публичный Метод

Empty cache and load again
public reload ( ) : array
Результат array Category tree loaded
    public function reload()
    {
        $this->cache->delete($this->getKey());
        $this->storeCategoryTree = null;
        return $this->load();
    }

Usage Example

 /**
  * This method is called every time that some property that could affect the categories tree is changed and it
  * reloads the full tree.
  */
 public function onChange()
 {
     $this->storeCategoryTree->reload();
 }