You are here

function _uuid_validate_specified_types in Universally Unique IDentifier 6

1 call to _uuid_validate_specified_types()
drush_uuid_create_missing in ./uuid.drush.inc
Drush command callback.

File

./uuid.drush.inc, line 53
Drush implementation for the uuid module.

Code

function _uuid_validate_specified_types($args) {
  $types = variable_get('uuid_automatic_for_nodes', array());

  // Remove disabled node types.
  $types = array_filter($types);
  foreach ($args as $arg) {
    if (!in_array($arg, $types)) {
      return array(
        FALSE,
        'One or more of the content types you specified are not selected for automatic UUID generation.',
      );
    }
  }
  return array(
    TRUE,
  );
}