node_type_update_nodes($old_id,$new_id)
Updates all nodes of one type to be of another type.
string $old_id: The current node type of the nodes.
string $new_id: The new node type of the nodes.
The number of nodes whose node type field was modified.
function node_type_update_nodes($old_id, $new_id) { return \Drupal::entityManager()->getStorage('node')->updateType($old_id, $new_id); }
© 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/core!modules!node!node.module/function/node_type_update_nodes/8.1.x