You are here

function picture_mapping_validate in Picture 7

Validate mappings.

1 call to picture_mapping_validate()
picture_admin_import_form_validate in ./picture.admin.inc
Validate a mapping import.

File

./picture.module, line 303
Picture formatter.

Code

function picture_mapping_validate($mapping) {
  if (!is_object($mapping)) {
    return FALSE;
  }
  foreach (array(
    'machine_name',
    'breakpoint_group',
    'mapping',
  ) as $property) {
    if (!property_exists($mapping, $property)) {
      return FALSE;
    }
  }
  return TRUE;
}