You are here

protected function EuCookieComplianceConfigForm::getRoles in EU Cookie Compliance (GDPR Compliance) 8

Same name and namespace in other branches
  1. 2.0.x src/Form/EuCookieComplianceConfigForm.php \Drupal\eu_cookie_compliance\Form\EuCookieComplianceConfigForm::getRoles()

Gets the roles to display in this form.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of role objects.

2 calls to EuCookieComplianceConfigForm::getRoles()
EuCookieComplianceConfigForm::buildForm in src/Form/EuCookieComplianceConfigForm.php
Form constructor.
EuCookieComplianceConfigForm::submitForm in src/Form/EuCookieComplianceConfigForm.php
Form submission handler.

File

src/Form/EuCookieComplianceConfigForm.php, line 103

Class

EuCookieComplianceConfigForm
Provides settings for eu_cookie_compliance module.

Namespace

Drupal\eu_cookie_compliance\Form

Code

protected function getRoles() {
  return $this->roleStorage
    ->loadMultiple();
}