function office_hours_element_info in Office Hours 7
Implements FAPI hook_element_info().
File
- ./
office_hours.module, line 40 - Creates a field and widget for inserting working or office hours per day
Code
function office_hours_element_info() {
return array(
'office_hours_block' => array(
'#input' => TRUE,
'#process' => array(
'_office_hours_block_process',
),
'#element_validate' => array(
'_office_hours_block_validate',
),
'#tree' => TRUE,
'#columns' => array(
'day',
'starthours',
'endhours',
'comment',
),
'#theme' => 'office_hours_block',
'#attached' => array(
// 'css' => array(
// drupal_get_path('module', 'office_hours') . '/office_hours.css',
// ),
'js' => array(
drupal_get_path('module', 'office_hours') . '/js/office_hours.widget.js',
),
),
),
'office_hours_select' => array(
'#input' => TRUE,
'#process' => array(
'_office_hours_select_process',
),
'#element_validate' => array(
'_office_hours_select_validate',
),
'#tree' => TRUE,
'#theme' => 'office_hours_select',
'#value_callback' => '_office_hours_select_value_callback',
),
'office_hours_comment' => array(
'#input' => TRUE,
'#process' => array(
'_office_hours_comment_process',
),
'#element_validate' => array(
'_office_hours_comment_validate',
),
),
);
}