class views_content_cache_key_node in Views content cache 6.2
Same name and namespace in other branches
- 7.3 plugins/views_content_cache/node.inc \views_content_cache_key_node
Hierarchy
- class \views_content_cache_key
- class \views_content_cache_key_node
Expanded class hierarchy of views_content_cache_key_node
1 string reference to 'views_content_cache_key_node'
- views_content_cache_views_content_cache_plugins in ./
views_content_cache.module - Implementation of hook_context_plugins().
File
- plugins/
node.inc, line 3
View source
class views_content_cache_key_node extends views_content_cache_key {
function options_form($value, &$handler) {
return array(
'#title' => t('Node types'),
'#description' => t('Checks for new or updated nodes of any of the selected types.'),
'#type' => 'checkboxes',
'#options' => array_merge(node_get_types('names'), $this
->additional_options_for_arguments($handler->view)),
'#default_value' => $value,
'#weight' => -10,
);
}
function content_key($object, $object_type) {
if ($object_type === 'node') {
return $object->type;
}
elseif ($object_type === 'comment' && !empty($object['nid']) && ($node = node_load($object['nid']))) {
return $node->type;
}
}
/**
* We support using the node type argument for the view key
*/
function view_key_from_arguments() {
return array(
'views_handler_argument_node_type',
);
}
}Members
|
Name |
Modifiers | Type | Description | Overrides |
|---|---|---|---|---|
|
views_content_cache_key:: |
function | Handy helper method that scans the given view looking for arguments. | ||
|
views_content_cache_key:: |
function | The method by which this plugin's where clause will be combined with others. | 2 | |
|
views_content_cache_key:: |
function | An array of keys to check in this cache segment when viewing the view. | 1 | |
|
views_content_cache_key:: |
function | Replaces values corresponding to argument values set dynamically. | ||
|
views_content_cache_key_node:: |
function |
Builds an array of keys for the cache segment. Overrides views_content_cache_key:: |
||
|
views_content_cache_key_node:: |
function |
Optionally provides a option form for the user to use this segment. Overrides views_content_cache_key:: |
||
|
views_content_cache_key_node:: |
function |
We support using the node type argument for the view key Overrides views_content_cache_key:: |