function ctools_context_exists_ctools_access_check

Check for access.

1 string reference to 'ctools_context_exists_ctools_access_check'
context_exists.inc in plugins/access/context_exists.inc

File

plugins/access/context_exists.inc, line 34

Code

function ctools_context_exists_ctools_access_check($conf, $context) {
    // Xor returns false if the two bools are the same, and true if they are not.
    // i.e, if we asked for context_exists and it does, return true.
    // If we asked for context does not exist and it does, return false.
    return empty($context->data) xor !empty($conf['exists']);
}