function coder_upgrade_upgrade_call_comment_node_url_alter in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/conversions/call.inc \coder_upgrade_upgrade_call_comment_node_url_alter()
Implements hook_upgrade_call_comment_node_url_alter().
File
- coder_upgrade/
conversions/ call.inc, line 343 - Provides conversion routines applied to function calls.
Code
function coder_upgrade_upgrade_call_comment_node_url_alter(&$node, &$reader) {
// DONE
// Create helper objects.
$editor = PGPEditor::getInstance();
// Get the function call object.
$item =& $node->data;
// Process function call.
$item
->insertStatementBefore($editor
->commentToStatement('// TODO Please make sure $comment is a valid comment object.'));
$temp = $editor
->expressionToStatement("'comment/' . \$comment->cid");
$node->container
->insertListBefore($node, $temp);
$node->container
->delete($node);
}