function Secure::__construct

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Secure.php \Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation\Secure::__construct()
  2. 8.9.x core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Secure.php \Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation\Secure::__construct()
  3. 10 core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Secure.php \Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation\Secure::__construct()

File

core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Secure.php, line 12

Class

Secure

Namespace

Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation

Code

public function __construct(array $values) {
    if (is_string($values['value'])) {
        $values['value'] = array(
            $values['value'],
        );
    }
    $this->roles = $values['value'];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.