Ejemplo n.º 1
0
 /**
  * Only returns plugins that have a specific event
  * 
  * @param $eventName
  * @param $folder
  * @return array of JTable objects
  */
 static function getPluginsWithEvent($eventName, $folder = 'bookpro')
 {
     $return = array();
     if ($plugins = PluginHelper::getPlugins($folder)) {
         foreach ($plugins as $plugin) {
             if (PluginHelper::hasEvent($plugin, $eventName)) {
                 $return[] = $plugin;
             }
         }
     }
     return $return;
 }