function node_limit_clone_limit in Node Limit 8
Same name and namespace in other branches
- 6 node_limit.module \node_limit_clone_limit()
 - 7 node_limit.module \node_limit_clone_limit()
 
Callback to clone a limit.
1 string reference to 'node_limit_clone_limit'
- node_limit_menu in old/
node_limit.module  - Implements hook_menu().
 
File
- old/
node_limit.module, line 593  
Code
function node_limit_clone_limit($limit) {
  $old_title = $limit['title'];
  $limit['lid'] = _node_limit_next_limit_id();
  $limit['title'] = t('Clone of !title', array(
    '!title' => $old_title,
  ));
  node_limit_save($limit);
  \Drupal::messenger()
    ->addStatus(t('Cloned limit "%limit"', array(
    '%limit' => $old_title,
  )));
  drupal_goto('admin/structure/node_limit');
}