1 layout.module layout_set_layout_tempstore($item, $type = 'layout')

Store changes to a layout or menu item in the temporary store.

Parameters

Layout|LayoutMenuItem $item: The Layout item to save into tempstore.

string $type: The type of item to save. Must be either "layout" or "menu_item".

File

core/modules/layout/layout.module, line 1695
The Layout module creates pages and wraps existing pages in layouts.

Code

function layout_set_layout_tempstore($item, $type = 'layout') {
  if (empty($item->name)) {
    return;
  }

  $item->locked = array(
    'uid' => $GLOBALS['user']->uid,
    'updated' => REQUEST_TIME,
  );
  tempstore_set('layout.' . $type, $item->name, $item, 604800);
}