Example #1
0
 public function inspect_package($pkgID = 0)
 {
     if ($pkgID > 0) {
         $pkg = Package::getByID($pkgID);
     }
     if (isset($pkg) && $pkg instanceof PackageEntity) {
         $manager = new Manager($this->app);
         $this->set('categories', $manager->getPackageItemCategories());
         $this->set('pkg', $pkg);
     } else {
         $this->redirect('/dashboard/extend/install');
     }
 }
Example #2
0
 /**
  * Upgrades a package's database and refreshes all blocks.
  */
 public function upgrade()
 {
     $this->upgradeDatabase();
     // now we refresh all blocks
     $manager = new Manager($this->app);
     $items = $manager->driver('block_type')->getItems($this->getPackageEntity());
     foreach ($items as $item) {
         $item->refresh();
     }
     \Localization::clearCache();
 }