1 layout.admin.inc | layout_clone_form($form, &$form_state, $layout) |
Form callback; Copy an existing layout into a new layout.
Related topics
File
- core/
modules/ layout/ layout.admin.inc, line 2557 - Admin page callbacks for the Layout module.
Code
function layout_clone_form($form, &$form_state, $layout) {
$layout_clone = $layout->getClone();
$settings_form = layout_settings_form($form, $form_state, $layout_clone);
$form['title'] = $settings_form['title'];
$form['name'] = $settings_form['name'];
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Clone layout'),
);
return $form;
}