You are here

private function H5PEditorAjaxImport::isHubOn in Opigno module 3.x

Same name and namespace in other branches
  1. 8 src/H5PImportClasses/H5PEditorAjaxImport.php \Drupal\opigno_module\H5PImportClasses\H5PEditorAjaxImport::isHubOn()

Checks if H5P Hub is enabled. Sets error message on fail.

Return value

bool

1 call to H5PEditorAjaxImport::isHubOn()
H5PEditorAjaxImport::h5pLibariesList in src/H5PImportClasses/H5PEditorAjaxImport.php
Gets the list of libraries.

File

src/H5PImportClasses/H5PEditorAjaxImport.php, line 78

Class

H5PEditorAjaxImport
Class H5PEditorAjaxMigrate.

Namespace

Drupal\opigno_module\H5PImportClasses

Code

private function isHubOn() {
  if (!$this->core->h5pF
    ->getOption('hub_is_enabled', TRUE)) {
    \H5PCore::ajaxError($this->core->h5pF
      ->t('The hub is disabled. You can enable it in the H5P settings.'), 'HUB_DISABLED', 403);
    return false;
  }
  return true;
}