function hook_views_default_views_alter

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 views.api.php hook_views_default_views_alter(&$views)
cle7 views.api.php hook_views_default_views_alter(&$views)
elmsmedia7 views.api.php hook_views_default_views_alter(&$views)
icor7 views.api.php hook_views_default_views_alter(&$views)
meedjum_blog7 views.api.php hook_views_default_views_alter(&$views)
mooc7 views.api.php hook_views_default_views_alter(&$views)

Alter default views defined by other modules.

This hook is called right before all default views are cached to the database. It takes a keyed array of views by reference.

Example usage to add a field to a view:

  $handler =& $view->display['DISPLAY_ID']->handler;
  // Add the user name field to the view.
  $handler->display->display_options['fields']['name']['id'] = 'name';
  $handler->display->display_options['fields']['name']['table'] = 'users';
  $handler->display->display_options['fields']['name']['field'] = 'name';
  $handler->display->display_options['fields']['name']['label'] = 'Author';
  $handler->display->display_options['fields']['name']['link_to_user'] = 1;

Related topics

1 function implements hook_views_default_views_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

data_entity_views_default_views_alter in sites/all/modules/local_contrib/data/data_entity/views/data_entity.views.inc
Implements hook_views_default_views_alter().

File

sites/all/modules/ulmus/views/views.api.php, line 775
Describe hooks provided by the Views module.

Code

function hook_views_default_views_alter(&$views) {
  if (isset($views['taxonomy_term'])) {
    $views['taxonomy_term']->display['default']->display_options['title'] = 'Categories';
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.