/** * Collect items * * @param string $type * * @return @return \Opis\Colibri\Collectors\AbstractCollector * * @throws \Exception */ public function collect($type) { if (null === $this->app->config()->read("collectors.{$type}")) { throw new \Exception('Unknown collector type "' . $type . '"'); } $collector = $this->container()->make($type, array($this->app)); return $this->dispatch(new CollectorEntry($type, $collector)); }
/** * Disable a module * * @param string $module * @param boolean $recollect (optional) * * @return boolean */ public function disable($module, $recollect = true) { $module = $this->toModuleId($module); if (!$this->canBeDisabled($module)) { return false; } $this->executeInstallerAction($module, 'disable'); $this->app->config()->write('modules.enabled.' . $module, false); $this->unregisterAssets($module); if ($recollect) { $this->app->recollect(); } $this->app->emit('module.disabled.' . $module); return true; }