1 layout.admin.inc | layout_condition_add_form_cancel($form, &$form_state) |
Submit handler for the cancel button on layout_condition_add_form().
File
- core/
modules/ layout/ layout.admin.inc, line 2146 - Admin page callbacks for the Layout module.
Code
function layout_condition_add_form_cancel($form, &$form_state) {
if (isset($form_state['block'])) {
/* @var Block $block */
$block = $form_state['block'];
/* @var Layout $layout */
$layout = $form_state['layout'];
$renderer_name = isset($layout->in_progress['renderer_name']) ? $layout->in_progress['renderer_name'] : 'editor';
$renderer = layout_create_renderer($renderer_name, $layout);
$form_state['redirect'] = $renderer->getUrl('configure-block', $block->uuid);
}
}