You are here

function _encrypt_plugin_is_valid in Encrypt 7.2

Same name and namespace in other branches
  1. 7.3 encrypt.module \_encrypt_plugin_is_valid()

Helper function to determine if a plugin has unmet dependencies.

Most helpful in conjunction with array_filter().

Parameters

array $plugin: The plugin to check.

Return value

bool Whether or not the plugin is valid (has no unmet dependencies).

2 string references to '_encrypt_plugin_is_valid'
encrypt_get_encryption_methods in ./encrypt.module
Returns information for all encryption methods.
encrypt_get_key_providers in ./encrypt.module
Returns info for all encryption key providers.

File

./encrypt.module, line 551
Main Encrypt Drupal File.

Code

function _encrypt_plugin_is_valid(array $plugin) {
  if (isset($plugin['dependency errors']) && !empty($plugin['dependency errors'])) {
    return FALSE;
  }
  else {
    return TRUE;
  }
}