drupal_clone

Versions
4.7 – 6
drupal_clone($object)

Provide a substitute clone() function for PHP4.

▾ 5 functions call drupal_clone()

node_load in modules/node/node.module
Load a node object from the database.
node_preview in modules/node/node.pages.inc
Generate a node preview.
node_unpublish_by_keyword_action in modules/node/node.module
Implementation of a configurable Drupal action. Unpublish a node if it contains a certain string.
taxonomy_get_tree in modules/taxonomy/taxonomy.module
Create a hierarchical representation of a vocabulary.
theme_node_preview in modules/node/node.pages.inc
Display a node preview for display during node creation and editing.

Code

includes/common.inc, line 1720

<?php
function drupal_clone($object) {
  return version_compare(phpversion(), '5.0') < 0 ? $object : clone($object);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.