You are here

function panels_page_sanitize in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_page/panels_page.module \panels_page_sanitize()

Sanitize a panel prior to saving it.

4 calls to panels_page_sanitize()
panels_page_add_page in panels_page/panels_page.admin.inc
Handle the add panel-page page.
panels_page_load in panels_page/panels_page.module
Load a panel page.
panels_page_load_all in panels_page/panels_page.module
Fetch all panel pages in the system.
panels_page_save in panels_page/panels_page.admin.inc
Main entry point for panels_page save functions.

File

panels_page/panels_page.module, line 1021
panels_page.module

Code

function panels_page_sanitize(&$page) {
  foreach (array(
    'arguments',
    'displays',
    'contexts',
    'relationships',
    'switcher_options',
  ) as $id) {
    if (!is_array($page->{$id})) {
      $page->{$id} = array();
    }
  }
  return $page;
}