function views_content_cache_key::additional_options_for_arguments in Views content cache 7.3
Same name and namespace in other branches
- 6.2 plugins/base.inc \views_content_cache_key::additional_options_for_arguments()
Handy helper method that scans the given view looking for arguments.
2 calls to views_content_cache_key::additional_options_for_arguments()
- views_content_cache_key_node::options_form in plugins/
views_content_cache/ node.inc - Optionally provides a option form for the user to use this segment.
- views_content_cache_key_og::options_form in plugins/
views_content_cache/ og.inc - Optionally provides a option form for the user to use this segment.
File
- plugins/
views_content_cache/ base.inc, line 124 - Provides the base Views content cache plugin.
Class
- views_content_cache_key
- Base class for the views content cache plugins.
Code
function additional_options_for_arguments(&$view) {
$options = array();
$arguments = $view->display_handler
->get_handlers('argument');
if (is_array($arguments)) {
foreach ($arguments as $arg_id => $argument) {
foreach ($this
->view_key_from_arguments() as $class) {
if (is_a($argument, $class)) {
// This argument can provide us with keys.
$options['__arg:' . $arg_id] = t('Value from argument: %title', array(
'%title' => $argument
->ui_name(),
));
}
}
}
}
return $options;
}