You are here

fillpdf_test.module in FillPDF 7

FillPDF Testing module.

File

tests/modules/fillpdf_test/fillpdf_test.module
View source
<?php

/**
 * @file
 * FillPDF Testing module.
 */

/**
 * Implements hook_node_access().
 */
function fillpdf_test_node_access($node, $op, $account) {
  if (is_string($node)) {
    $node = new stdClass();
    $node->type = $node;
  }
  if ($node->type !== 'page') {
    return NODE_ACCESS_IGNORE;
  }
  if (!empty($account->uid) && (int) $account->uid === 1) {
    return NODE_ACCESS_ALLOW;
  }
  return NODE_ACCESS_DENY;
}

Functions

Namesort descending Description
fillpdf_test_node_access Implements hook_node_access().