You are here

public static function FPAFormBuilder::checkMemoryLimit in Fast Permissions Administration 8.2

Same name and namespace in other branches
  1. 3.0.x src/FPAFormBuilder.php \Drupal\fpa\FPAFormBuilder::checkMemoryLimit()
2 calls to FPAFormBuilder::checkMemoryLimit()
fpa_form_user_admin_permissions_alter in ./fpa.module
Implements hook_form_FORM_ID_alter().
fpa_requirements in ./fpa.install
Implements hook_requirements().

File

src/FPAFormBuilder.php, line 44
Contains Drupal\fpa\FPAFormBuilder.

Class

FPAFormBuilder
Class FPAFormBuilder.

Namespace

Drupal\fpa

Code

public static function checkMemoryLimit() {
  $permissions_memory_required = static::getRequiredMemory('b');
  $memory_limit = ini_get('memory_limit');
  return !$memory_limit || $memory_limit == -1 || Bytes::toInt($memory_limit) >= Bytes::toInt($permissions_memory_required);
}