function ctools_node_access_ctools_access_summary

Provide a summary description based upon the checked node_accesss.

1 string reference to 'ctools_node_access_ctools_access_summary'
node_access.inc in plugins/access/node_access.inc
Plugin to provide access control based upon node type.

File

plugins/access/node_access.inc, line 71

Code

function ctools_node_access_ctools_access_summary($conf, $context) {
    list($user_context, $node_context) = $context;
    $replacement = array(
        '@user' => $user_context->identifier,
        '@node' => $node_context->identifier,
    );
    switch ($conf['type']) {
        case 'view':
            return t('@user can view @node.', $replacement);
        case 'update':
            return t('@user can edit @node.', $replacement);
        case 'delete':
            return t('@user can delete @node.', $replacement);
        case 'create':
            return t('@user can create nodes of the same type as @node.', $replacement);
    }
}