You are here

public static function Runtime::shouldEnforceReadOnlyMode in Acquia Search 3.x

Determine if we should enforce read-only mode.

Return value

bool TRUE if we should enforce read-only mode.

9 calls to Runtime::shouldEnforceReadOnlyMode()
acquia_search_form_search_api_index_edit_form_alter in ./acquia_search.module
Implements hook_form_FORM_ID_alter().
acquia_search_form_search_api_server_edit_form_alter in ./acquia_search.module
Implements hook_form_FORM_ID_alter().
acquia_search_form_search_api_server_status_alter in ./acquia_search.module
Implements hook_form_FORM_ID_alter().
acquia_search_preprocess_search_api_index in ./acquia_search.module
Implements hook_preprocess_HOOK().
acquia_search_preprocess_search_api_server in ./acquia_search.module
Theme override function for Search API server status page.

... See full list

File

src/Helper/Runtime.php, line 99

Class

Runtime
Class Runtime.

Namespace

Drupal\acquia_search\Helper

Code

public static function shouldEnforceReadOnlyMode() : bool {
  $read_only = FALSE;

  // Check if the read-only mode is forced in configuration.
  if (Storage::isReadOnly()) {
    $read_only = TRUE;
  }
  \Drupal::moduleHandler()
    ->alter('acquia_search_should_enforce_read_only', $read_only);
  return $read_only;
}