コード例 #1
0
 /**
  * @param $extension
  * @return bool
  */
 protected function isExtensionInstalled($extension)
 {
     if (!$this->extensions) {
         $modules = $this->extensionManager->discoverModules()->showCore()->showNoCore()->showInstalled()->getList(TRUE);
         $themes = $this->extensionManager->discoverThemes()->showCore()->showNoCore()->showInstalled()->getList(TRUE);
         $profiles = $this->extensionManager->discoverProfiles()->showCore()->showNoCore()->showInstalled()->getList(TRUE);
         $this->extensions = array_merge($modules, $themes, $profiles);
     }
     return in_array($extension, $this->extensions);
 }
コード例 #2
0
 /**
  * @param bool|TRUE $status
  * @return int
  */
 private function getModuleCount($status = true)
 {
     if ($status) {
         return count($this->extensionManager->discoverModules()->showCore()->showNoCore()->showInstalled()->getList());
     }
     return count($this->extensionManager->discoverModules()->showCore()->showNoCore()->showUninstalled()->getList());
 }