This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-05-19 16:20:44 -04:00
parent 23fad3c548
commit 23a928c7e0
3 changed files with 31 additions and 7 deletions

View File

@@ -520,7 +520,7 @@ class PMPlugin
* @param string $workspace
* @return array
*/
public static function getList($workspace)
public static function getListPluginsManager($workspace)
{
$items = Array();
$aPluginsPP = array();
@@ -576,6 +576,27 @@ class PMPlugin
}
return $items;
}
public static function getListAllPlugins($workspace)
{
$pathSingleton = PATH_DATA . "sites" . PATH_SEP . $workspace . PATH_SEP . "plugin.singleton";
$oPluginRegistry = PMPluginRegistry::loadSingleton($pathSingleton);
//$oPluginRegistry = PMPluginRegistry::getSingleton();
$items = [];
if ($handle = opendir(PATH_PLUGINS)) {
while (false !== ($file = readdir($handle))) {
if (strpos($file, '.php', 1) && is_file(PATH_PLUGINS . $file)) {
include_once (PATH_PLUGINS . $file);
$detail = $oPluginRegistry->getPluginDetails($file);
if ($detail !== null) {
$items[] = $detail;
}
}
}
closedir($handle);
}
return $items;
}
}