Beispiel #1
0
 /**
  * Retrieve an array of all the plugins in the plugin directory.
  * A plugin is considered to be present when a directory includes a
  * plugin.php file or has a valid plugin class.
  *
  * @return array A list of valid plugin directory names.
  */
 protected function _getDirectoryList()
 {
     // Construct the current list of potential, installed & active plugins
     require_once 'VersionedDirectoryIterator.php';
     // Loop through all the plugins in the plugin directory,
     // and add each plugin directory name that has a plugin.php file
     // to the list of all plugin directory names
     $dir = new VersionedDirectoryIterator($this->_basePath);
     return $dir->getValid();
 }
Beispiel #2
0
 /**
  * Retrieve all themes
  *
  * @return array An array of theme objects
  */
 public static function getAllThemes()
 {
     /**
      * Create an array of themes, with the directory paths
      * theme.ini files and images paths if they are present
      */
     $themes = array();
     $iterator = new VersionedDirectoryIterator(PUBLIC_THEME_DIR);
     $themeDirs = $iterator->getValid();
     foreach ($themeDirs as $themeName) {
         $themes[$themeName] = self::getTheme($themeName);
     }
     return $themes;
 }