You are here

function skinr_context_group_validate in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 skinr_context/skinr_context.module \skinr_context_group_validate()

Validate a skin group object.

Parameters

$group: A skin group object.

Return value

TRUE on success, FALSE on failure.

2 calls to skinr_context_group_validate()
skinr_context_group_save in skinr_context/skinr_context.module
Save a skin group object.
skinr_context_ui_import_form_validate in skinr_context/skinr_context_ui.module
Form validation handler for skinr_ui_import_form().

File

skinr_context/skinr_context.module, line 44
Provides Skinr integration with Context.

Code

function skinr_context_group_validate(&$group) {
  if (empty($group->gid) || empty($group->module) || empty($group->element) || empty($group->title)) {
    return FALSE;
  }
  if (!isset($group->conditions) || !is_array($group->conditions)) {
    return FALSE;
  }
  return TRUE;
}