Generic page handler function


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function gar_v2_default_page_manager_handlers(){
  2. $handlers = array();
  3. $path = dirname(__FILE__) . '/panels/task_handlers';
  4. $files = drupal_system_listing('.inc$', $path, 'name', 0);
  5. foreach ($files as $file) {
  6. include ($file->filename);
  7. if (!empty($handler->name)) {
  8. $handlers[$handler->name] = $handler;
  9. }
  10. }
  11. return $handlers;
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.