function panels_mini_sanitize in Panels 6.2
Same name and namespace in other branches
- 5.2 panels_mini/panels_mini.module \panels_mini_sanitize()
Sanitize a mini panel, to guarantee certain data is as we believe it will be.
3 calls to panels_mini_sanitize()
- panels_mini_load in panels_mini/
panels_mini.module - Load a mini panel.
- panels_mini_load_all in panels_mini/
panels_mini.module - Fetch all mini panels in the system.
- panels_mini_save in panels_mini/
panels_mini.module - Save a mini panel.
File
- panels_mini/
panels_mini.module, line 213 - panels_mini.module
Code
function panels_mini_sanitize($mini) {
foreach (array(
'contexts',
'relationships',
'requiredcontexts',
) as $id) {
if (!isset($mini->{$id}) || !is_array($mini->{$id})) {
$mini->{$id} = array();
}
}
return $mini;
}