function _protected_node_views_extended_dates in Protected Node 6
Same name and namespace in other branches
- 7 protected_node_views/protected_node_views.views.inc \_protected_node_views_extended_dates()
- 1.0.x protected_node_views/protected_node_views.views.inc \_protected_node_views_extended_dates()
Dates for the protected node.
1 call to _protected_node_views_extended_dates()
- protected_node_views_views_data in ./
protected_node_views.views.inc - Implementation of hook_views_data().
File
- ./
protected_node_views.views.inc, line 10 - Protected Node views declarations.
Code
function _protected_node_views_extended_dates(&$data, $field, $label) {
$entries = array(
'fulldate' => array(
'help' => t('CCYYMMDD'),
'label' => t('full date'),
),
'year_month' => array(
'help' => t('CCYYMM'),
'label' => t('year + month'),
),
'year' => array(
'help' => t('CCYY'),
'label' => t('year'),
),
'month' => array(
'help' => t('MM (01 - 12)'),
'label' => t('month'),
),
'day' => array(
'help' => t('DD (01 - 31)'),
'label' => t('day'),
),
'week' => array(
'help' => t('WW (01 - 53)'),
'label' => t('week'),
),
);
foreach ($entries as $f => $e) {
$data['protected_nodes'][$field . '_' . $f] = array(
'title' => $label . ' ' . $e['label'],
'help' => t('In the form of') . ' ' . $e['help'] . '.',
'argument' => array(
'field' => $field,
'handler' => 'views_handler_argument_node_created_' . $f,
),
);
}
}