You are here

function panels_page_sanitize in Panels 6.2

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

Sanitize a panel with safe, empty values.

Used by various panels_page CRUD-type functions.

3 calls to panels_page_sanitize()
panels_page_add_handler in panels_page/panels_page.admin.inc
Handle the add panel-page page.
panels_page_load_all in panels_page/panels_page.read.inc
Fetch all panel pages in the system.
panels_page_save in panels_page/panels_page.write.inc
Main entry point for panels_page save functions.

File

panels_page/panels_page.module, line 516
panels_page.module

Code

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