function coder_upgrade_upgrade_call_format_date_alter in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/conversions/call.inc \coder_upgrade_upgrade_call_format_date_alter()
Implements hook_upgrade_call_format_date_alter().
File
- coder_upgrade/
conversions/ call.inc, line 1699 - Provides conversion routines applied to function calls.
Code
function coder_upgrade_upgrade_call_format_date_alter(&$node, &$reader) {
// Create helper objects.
$editor = PGPEditor::getInstance();
// Get the function call object.
$item =& $node->data;
// Change date types
$date_type = $item
->printParameter(1);
$date_type = trim($date_type, "'\"");
switch ($date_type) {
case 'small':
$editor
->setParameter($item, 1, "'short'");
break;
case 'large':
$editor
->setParameter($item, 1, "'long'");
break;
}
}