* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Class which outputs the html page for Hooks view * * @category DMS * @package SeedDMS * @author Uwe Steinmann * @copyright Copyright (C) 2016 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_Hooks extends SeedDMS_Bootstrap_Style { /** * List all registered hooks * */ function list_hooks() { /* {{{ */ if(!isset($GLOBALS['SEEDDMS_HOOKS'])) return; echo "\n"; echo ""; echo "\n"; echo ""; echo ""; foreach(array('controller', 'view') as $type) { if(isset($GLOBALS['SEEDDMS_HOOKS'][$type])) { foreach($GLOBALS['SEEDDMS_HOOKS'][$type] as $name=>$objects) { $first = true; foreach($objects as $object) { $reflector = new ReflectionClass(get_class($object)); $methods = $reflector->getMethods(); array_walk($methods, function (&$v) { $v = $v->getName()."();"; }); if($first) echo ""; else echo ""; $first = false; } } } } echo ""; echo "
TypeName of hookName of classFile
".$type."".$name."".get_class($object)."

Methods: ".implode(" ", $methods)."

".$reflector->getFilename()."
".get_class($object)."

Methods: ".implode("; ", $methods)."

".$reflector->getFilename()."
\n"; } /* }}} */ function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading("Hooks"); self::list_hooks(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ }