You are here

public static function BookAccess::api in Book access 6.2

Same name and namespace in other branches
  1. 7.2 book_access.module \BookAccess::api()

Verifies the current API version is included between two values passed as arguments.

Parameters

$minimum: The minimum API version required.

$maximum: The maximum version required. This argument is optional; the current API will be checked against this value only if it is passed to the function.

Return value

TRUE, if the current API version is included between the passed values.

File

./book_access.module, line 134
Allows to set the access control for book nodes on a per book basis. It is based on forum_access.module and tac_lite.module.

Class

BookAccess
@file

Code

public static function api($minimum, $maximum = NULL) {
  if (version_compare(self::API_VERSION, $minimum, '<')) {
    return FALSE;
  }
  if (isset($maximum) && version_compare(self::API_VERSION, $maximum, '>')) {
    return FALSE;
  }
  return TRUE;
}