function workflow_state_ctools_access_check in Workflow 7.2
Custom callback defined by 'callback' in the $plugin array.
Check for access.
1 string reference to 'workflow_state_ctools_access_check'
- workflow_state.inc in workflow_node/
plugins/ access/ workflow_state.inc - Describes a CTools Access plugin.
File
- workflow_node/
plugins/ access/ workflow_state.inc, line 32 - Describes a CTools Access plugin.
Code
function workflow_state_ctools_access_check($conf, $context) {
// For some unknown reason $context may not be set. We just want to be sure.
if (empty($context) || empty($context->data) || empty($context->data->workflow)) {
return FALSE;
}
// If the node's content type is not part of the selected workflow access to
// the pane is denied.
$workflow_state = $context->data->workflow;
if ($conf['workflow_state'] == $workflow_state) {
return TRUE;
}
return FALSE;
}