You are here

public function MoxtraConnector::checkSettings in Opigno Moxtra 3.x

Same name and namespace in other branches
  1. 8 src/MoxtraConnector.php \Drupal\opigno_moxtra\MoxtraConnector::checkSettings()

Check if Moxtra settings is fine.

1 call to MoxtraConnector::checkSettings()
MoxtraConnector::request in src/MoxtraConnector.php
Helper function to send a request with JSON data to the Moxtra API.

File

src/MoxtraConnector.php, line 222

Class

MoxtraConnector

Namespace

Drupal\opigno_moxtra

Code

public function checkSettings() {
  $fields = [
    'client_id',
    'client_secret',
    'email',
    'org_id',
  ];
  foreach ($fields as $field) {
    if (empty($this->settings[$field])) {
      return FALSE;
    }
  }
  return TRUE;
}