Révision db9ffd17
Ajouté par Assos Assos il y a presque 10 ans
drupal7/sites/all/modules/date/date.module | ||
---|---|---|
536 | 536 |
if (!empty($field['settings']['todate'])) { |
537 | 537 |
// Define a simple data structure containing both dates. |
538 | 538 |
$property['type'] = ($field['cardinality'] != 1) ? 'list<struct>' : 'struct'; |
539 |
$property['auto creation'] = 'date_entity_metadata_struct_create'; |
|
539 | 540 |
$property['getter callback'] = 'entity_metadata_field_verbatim_get'; |
540 | 541 |
$property['setter callback'] = 'entity_metadata_field_verbatim_set'; |
541 | 542 |
$property['property info'] = array( |
... | ... | |
645 | 646 |
drupal_static_reset('field_language'); |
646 | 647 |
} |
647 | 648 |
|
649 |
/** |
|
650 |
* Auto creation callback for fields which contain two date values in one |
|
651 |
*/ |
|
652 |
function date_entity_metadata_struct_create($name, $property_info) { |
|
653 |
return array( |
|
654 |
'date_type' => $property_info['field']['columns'][$name]['type'], |
|
655 |
'timezone_db' => $property_info['field']['settings']['timezone_db'], |
|
656 |
); |
|
657 |
} |
|
658 |
|
|
648 | 659 |
/** |
649 | 660 |
* Callback for setting an individual field value if a to-date may be there too. |
650 | 661 |
* Based on entity_property_verbatim_set(). |
Formats disponibles : Unified diff
Weekly update of contrib modules