function system_date_format_type_save
system_date_format_type_save($type)
Saves a date type to the database.
Parameters
$type: A date type array containing the following keys:
- type: The machine-readable name of the date type.
- title: The human-readable name of the date type.
- locked: A boolean indicating whether or not this date type should be configurable from the user interface.
- is_new: A boolean indicating whether or not this date type is as of yet unsaved in the database.
File
- modules/system/system.module, line 3864
- Configuration system that lets administrators modify the workings of the site.
Code
function system_date_format_type_save($type) { $info = array(); $info['type'] = $type['type']; $info['title'] = $type['title']; $info['locked'] = $type['locked']; // Update date_format table. if (!empty($type['is_new'])) { drupal_write_record('date_format_type', $info); } else { drupal_write_record('date_format_type', $info, 'type'); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/system_date_format_type_save/7.x