function alpha_pagination_save_view in Views Alpha Pagination 7.2
Saves a view.
Parameters
\view $view: The view object to save.
1 call to alpha_pagination_save_view()
- alpha_pagination_save_views in ./
alpha_pagination.module - Saves multiple views.
File
- ./
alpha_pagination.module, line 194 - Module hooks and alters for the Views Alpha Pagination module.
Code
function alpha_pagination_save_view(\view $view) {
static $features;
if (!isset($features)) {
$features = module_exists('features') ? features_get_component_map('views_view') : [];
}
// Save the view.
$view
->save();
// Notify about any potential features that may need to be manually updated.
if ($features && !empty($features[$view->name])) {
drupal_set_message(t('The features component "@feature.views_view" contains the view "@view". To ensure this change is persistent, the feature must be re-exported.', [
'@feature' => reset($features[$view->name]),
'@view' => $view->name,
]), 'warning');
}
}