function patterns_lab_is_valid_export_mode in Patterns 7
Same name and namespace in other branches
- 7.2 includes/forms/lab.inc \patterns_lab_is_valid_export_mode()
Returns TRUE if the passed parameter is a valid flag to configure Patterns behaviors with the 'include' tag.
1 call to patterns_lab_is_valid_export_mode()
- patterns_lab_validate in includes/
forms/ lab.inc - Checks if the patterns directory is ready and if the file name for exported patterns is valid.
File
- includes/
forms/ lab.inc, line 296 - Functions related to exporting patterns.
Code
function patterns_lab_is_valid_export_mode($mode = NULL) {
if (is_null($mode)) {
return FALSE;
}
$modes = array(
PATTERNS_EXPORT_MODE_FULL,
PATTERNS_EXPORT_MODE_ACTIONS,
PATTERNS_EXPORT_MODE_NAME,
PATTERNS_EXPORT_MODE_ID,
);
return in_array($mode, $modes) ? TRUE : FALSE;
}