Checks that module is configured.

@param \Drupal\social_auth_linkedin\Settings\LinkedInAuthSettings $settings
The LinkedIn auth settings.

@return bool
True if module is configured, False otherwise.
167473
protected function validateConfig(LinkedInAuthSettings $settings) {
    $client_id = $settings->getClientId();
    $client_secret = $settings->getClientSecret();

    if (!$client_id || !$client_secret) {
      $this->loggerFactory
        ->get('social_auth_linkedin')
        ->error('Define Client ID and Client Secret on module settings.');

      return FALSE;
    }

    return TRUE;
  }
928038
public function settings(array $settings = null)
    {
        if ($settings !== null) {
            $this->settings = $settings;
        }

        return $this->settings + static::$globalSettings;
    }
726803
public function pluginW3tc($settings)
    {
        if (empty($settings)) {
            return;
        }

        $available = [
            'remove_comment', 'remove_meta_box',
        ];

        // Special case
        if (is_bool($settings) && $settings) {
            $settings = $available;
        }

        foreach ($settings as $key) {
            $key = strtolower($key);

            if (!in_array($key, $available)) {
                continue;
            }

            if ('remove_comment' === $key) {
                add_filter('w3tc_can_print_comment', '__return_false', 10, 1);
                continue;
            }

            if ('remove_meta_box' === $key && OL_ZEUS_ISADMIN) {
                add_action('wp_dashboard_setup', function () {
                    remove_meta_box('w3tc_latest', 'dashboard', 'normal');
                });

                continue;
            }
        }
    }
754413
protected function removeNotUsedSettings($moduleSettings, $moduleId)
    {
        $moduleConfigs = array_keys($this->getModuleConfigs($moduleId));
        $moduleSettings = $this->parseModuleSettings($moduleSettings);

        $configsToRemove = array_diff($moduleConfigs, $moduleSettings);
        if (!empty($configsToRemove)) {
            $this->removeModuleConfigs($moduleId, $configsToRemove);
        }
    }
1324763
public final function has_admin_settings() {
        global $CFG;

        $pluginroot = $CFG->dirroot . '/mod/assign/' . substr($this->get_subtype(), strlen('assign')) . '/' . $this->get_type();
        $settingsfile = $pluginroot . '/settings.php';
        return file_exists($settingsfile);
    }
928659
public function isAccountingSetup()
  {
    $Setting = $this->Setting->byOrganization($this->AuthenticationManager->getCurrentUserOrganization('id'))->first();

    if(empty($Setting->is_configured))
    {
      return false;
    }
    else
    {
      return true;
    }
  }
862623
public final function get_config($setting = null) {
        global $DB;

        if ($setting) {
            if (!$this->assignment->has_instance()) {
                return false;
            }
            $assignment = $this->assignment->get_instance();
            if ($assignment) {
                $dbparams = array('assignment'=>$assignment->id,
                                  'subtype'=>$this->get_subtype(),
                                  'plugin'=>$this->get_type(),
                                  'name'=>$setting);
                $result = $DB->get_record('assign_plugin_config', $dbparams, '*', IGNORE_MISSING);
                if ($result) {
                    return $result->value;
                }
            }
            return false;
        }
        $dbparams = array('assignment'=>$this->assignment->get_instance()->id,
                          'subtype'=>$this->get_subtype(),
                           'plugin'=>$this->get_type());
        $results = $DB->get_records('assign_plugin_config', $dbparams);

        $config = new stdClass();
        if (is_array($results)) {
            foreach ($results as $setting) {
                $name = $setting->name;
                $config->$name = $setting->value;
            }
        }
        return $config;
    }
33674
private function isDurableMessagingEnabled(Settings $settings)
    {
        $enabled = $settings->tryGet(KnownSettingsEnum::DURABLE_MESSAGING_ENABLED);

        if ($enabled === null) {
            $enabled = true;
        }

        return $enabled;
    }
535088
private function _loadSettingsFromArray($settings)
    {
        if (isset($settings['sp'])) {
            $this->_sp = $settings['sp'];
        }
        if (isset($settings['idp'])) {
            $this->_idp = $settings['idp'];
        }

        $errors = $this->checkSettings($settings);
        if (empty($errors)) {
            $this->_errors = array();

            if (isset($settings['strict'])) {
                $this->_strict = $settings['strict'];
            }
            if (isset($settings['debug'])) {
                $this->_debug = $settings['debug'];
            }

            if (isset($settings['baseurl'])) {
                $this->_baseurl = $settings['baseurl'];
            }

            if (isset($settings['compress'])) {
                $this->_compress = $settings['compress'];
            }

            if (isset($settings['security'])) {
                $this->_security = $settings['security'];
            }

            if (isset($settings['contactPerson'])) {
                $this->_contacts = $settings['contactPerson'];
            }

            if (isset($settings['organization'])) {
                $this->_organization = $settings['organization'];
            }

            $this->_addDefaultValues();
            return true;
        } else {
            $this->_errors = $errors;
            return false;
        }
    }
6077
final public function isGranted(array $roles, array $resources, array $modules, array $accesses)
    {
        // Find a user which matches the required roles.
        $user = $this->checkRole($roles);

        if (null === $user) {
            return false;
        } else {
            return $this->isUserGranted($roles, $resources, $modules, $accesses, $user);
        }
    }
660270
protected function addRemoteResource(ResourceSettings $settings): bool
    {
        $settings->repositoryKey = $this->getRemoteResourceRepositoryKey($settings);

        if ($this->resources->has($settings->repositoryKey)) {
            ++$settings->order;

            return $this->addRemoteResource($settings);
        }

        if ($settings->url === null && (!$this->mergeResources || !$settings->compile)) {
            $settings->url = $this->getThemeBaseUrl($settings->theme);
        }

        $this->resources->add($settings->repositoryKey, $settings);

        return true;
    }
1065477
public function pluginWpSocializer($settings)
    {
        if (empty($settings)) {
            return;
        }

        $available = [
            'remove_meta_box',
        ];

        // Special case
        if (is_bool($settings) && $settings) {
            $settings = $available;
        }

        foreach ($settings as $key) {
            $key = strtolower($key);

            if (!in_array($key, $available)) {
                continue;
            }

            if ('remove_meta_box' === $key && OL_ZEUS_ISADMIN) {
                add_action('wp_dashboard_setup', function () {
                    remove_meta_box('aw_dashboard', 'dashboard', 'normal');
                });

                continue;
            }
        }
    }
68163
public function isAllowed($modulePath)
    {
        $modulePathSegments = explode('/', $modulePath);
        $moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));

        if (!$this->privilegeManager->isGranted(ModulePrivilege::class, new ModulePrivilegeSubject($modulePath))) {
            return false;
        }

        // @deprecated since Neos 3.2, use the ModulePrivilegeTarget instead!
        if (isset($moduleConfiguration['privilegeTarget']) && !$this->privilegeManager->isPrivilegeTargetGranted($moduleConfiguration['privilegeTarget'])) {
            return false;
        }

        return true;
    }
735321
protected static function validateSettings($settings)
    {
        if (!isset($settings['consumerKey']) || !isset($settings['consumerSecret'])) {
            return false;
        }
        $settings['token'] = isset($settings['token']) ? $settings['token'] : null;
        $settings['tokenSecret'] = isset($settings['tokenSecret']) ? $settings['tokenSecret'] : null;

        return $settings;
    }
443588
public function getJavascript(&$javascripts, Settings $settings)
    {
        if ($this->linktype == LinkConstants::LINK_JAVASCRIPT) {
            $javascripts[$this->getIdType() . $settings->getPrefix() . $this->getId()] = $this->javascript;
        }
    }
641324
public function setSMSAPICredential($provider, $credentials = array())
    {
        $this->checkCredentialManagementRights();

        $smsProviderInstance = SMSProvider::factory($provider);
        $smsProviderInstance->verifyCredential($credentials);

        $settings = $this->getCredentialManagerSettings();

        $settings[MobileMessaging::PROVIDER_OPTION] = $provider;
        $settings[MobileMessaging::API_KEY_OPTION] = $credentials;

        $this->setCredentialManagerSettings($settings);

        return true;
    }
1014943
public function _beforeSuite($settings = []) {
    if ($this->config['check_logs'] && \Drupal::moduleHandler()->moduleExists('dblog')) {
      // Clear log entries from the database log.
      \Drupal::database()->truncate('watchdog')->execute();
    }
  }