/**
  * Download the Extension Repository
  *
  * This forces the system to retrieve the new set of extensions based on
  * license key
  *
  * @return boolean
  *
  * @access public
  */
 public function downloadRepository()
 {
     $response = true;
     if ($extensions = aam_Core_API::getBlogOption('aam_extensions')) {
         if (is_array($extensions)) {
             $repo = new aam_Core_Repository();
             $repo->download();
         }
     }
     return $response;
 }
 /**
  * Remove extension
  *
  * @return string
  *
  * @access public
  */
 public function remove()
 {
     $repo = new aam_Core_Repository();
     $license = aam_Core_Request::post('license');
     $ext = aam_Core_Request::post('extension');
     if ($repo && $repo->remove($ext, $license)) {
         $response = array('status' => 'success');
     } else {
         $response = array('status' => 'failure');
     }
     return json_encode($response);
 }
 /**
  * Constructor
  *
  * The filter "aam_cpanel" can be used to control the Control Panel items.
  *
  * @return void
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->_repository = aam_Core_Repository::getInstance();
 }
 /**
  * Load Installed extensions
  *
  * @return void
  *
  * @access protected
  */
 protected function loadExtensions()
 {
     aam_Core_Repository::getInstance($this)->load();
 }
Exemple #5
0
 /**
  * Get single instance of itself
  * 
  * @param aam $parent
  * 
  * @return aam_Core_Repository
  * 
  * @access public
  * @static
  */
 public static function getInstance(aam $parent = null)
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self($parent);
     }
     return self::$_instance;
 }
Exemple #6
0
 /**
  * Load Installed extensions
  *
  * @return void
  *
  * @access protected
  */
 protected function loadExtensions()
 {
     $model = new aam_Core_Repository($this);
     $model->load();
 }