Example #1
0
 /**
  * @brief get a list of themes that are not yet installed
  * 
  * @access public
  * 
  * @return array list of themes that are not installed
  */
 public function notInstalled()
 {
     App::uses('InstallerLib', 'Installer.Lib');
     $installed = $this->installed();
     $notInstalled = array();
     foreach (InfinitasPlugin::listPlugins('loaded') as $plugin) {
         foreach (InstallerLib::findThemes($plugin) as $theme) {
             if (!array_key_exists($theme, $installed)) {
                 $notInstalled[$plugin . '.' . $theme] = Inflector::humanize(Inflector::underscore($plugin . Inflector::camelize($theme)));
             }
         }
     }
     foreach (InstallerLib::findThemes() as $theme) {
         if (!linkinfo(InstallerLib::themePath(null, $theme)) && !array_key_exists($theme, $installed)) {
             $notInstalled[$theme] = Inflector::humanize(Inflector::underscore($theme));
         }
     }
     return $notInstalled;
 }