You are here

function views_bulk_operations_theme in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 6 views_bulk_operations.module \views_bulk_operations_theme()
  2. 7.3 views_bulk_operations.module \views_bulk_operations_theme()

Implementation of hook_theme().

File

./views_bulk_operations.module, line 79
Allows operations to be performed on items selected in a view.

Code

function views_bulk_operations_theme() {
  $themes = array(
    'views_node_selector' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'views_bulk_operations_confirmation' => array(
      'arguments' => array(
        'objects' => NULL,
        'view' => NULL,
      ),
    ),
  );
  $files = file_scan_directory(drupal_get_path('module', 'views_bulk_operations'), '(.*).action.inc$');
  if ($files) {
    foreach ($files as $file) {
      $action_theme_fn = 'views_bulk_operations_' . str_replace('.', '_', basename($file->filename, '.inc')) . '_theme';
      if (function_exists($action_theme_fn)) {
        $themes += call_user_func($action_theme_fn);
      }
    }
  }
  return $themes;
}