1 layout.class.inc Layout::delete()

Delete this layout.

File

core/modules/layout/includes/layout.class.inc, line 360
Class for loading, modifying, and executing a layout.

Class

Layout
@file Class for loading, modifying, and executing a layout.

Code

function delete() {
  if ($this->storage === LAYOUT_STORAGE_NORMAL) {
    config('layout.layout.' . $this->name)->delete();
    // Reassign the menu item to a still-enabled layout (if any).
    if ($this->menu_item && $this->menu_item->name === $this->name) {
      $this->menu_item->reassign();
    }
    $this->invokeHook('delete');
    layout_reset_caches();
  }
  else {
    $this->disable();
  }
}