You are here

public static function BlockAriaLandmarkRoles::getAssociative in Block ARIA Landmark Roles 8

Get the defined ARIA roles as an associative array.

Return value

array An associative array of roles.

2 calls to BlockAriaLandmarkRoles::getAssociative()
BlockAriaLandmarkRolesTest::testGetRolesAssociative in tests/src/Unit/BlockAriaLandmarkRolesTest.php
Test getting the ARIA landmark roles as an associative array.
_block_aria_landmark_roles_get_roles in ./block_aria_landmark_roles.module
Return a list ARIA roles.

File

src/BlockAriaLandmarkRoles.php, line 42

Class

BlockAriaLandmarkRoles
Helper class for ARIA landmark roles.

Namespace

Drupal\block_aria_landmark_roles

Code

public static function getAssociative() {
  $self = new static();
  return array_combine($self->roles, $self->roles);
}