Ejemplo n.º 1
0
 /**
  * Gets the provided module with a minimum version
  * @param string $namespace The namespace of the module
  * @param string $name The name of the module
  * @param string $atLeastVersion The minimum version of the module
  * @return string Base64 encoded string of the phar file of the module
  */
 public function getModuleVersionAtLeast($namespace, $name, $atLeastVersion)
 {
     $file = $this->repository->getModuleFileForVersionAtLeast($namespace, $name, $atLeastVersion);
     return $this->getBase64FromFile($file);
 }
 /**
  * Creates a view for the modules in the provided namespace
  * @param string $namespace Namespace of the modules
  * @return zibo\repository\view\RepositoryView
  */
 private function getModulesView($namespace)
 {
     $modules = $this->repository->getModules($namespace);
     $basePath = $this->request->getBasePath();
     $tableAction = $basePath . '/' . self::ACTION_NAMESPACE . '/' . $namespace;
     $moduleAction = $basePath . '/' . self::ACTION_MODULE . '/' . $namespace . '/';
     $table = new ModuleTable($modules, $moduleAction, $tableAction);
     $form = $this->createModuleUploadForm();
     $this->breadcrumbs->addBreadcrumb($tableAction, $namespace);
     return new RepositoryView(ServerModule::TRANSLATION_TITLE, $table, $form, $this->breadcrumbs);
 }