You are here

public function SectionAssociationStorage::loadSection in Workbench Access 8

Loads section information.

A section is a dual-key index, so loading without an entity id requires two keys.

Parameters

$access_scheme_id: The id for an active access scheme entity.

$section_id: The id for a section within the access scheme.

Return value

\Drupal\workbench_access\Entity\SectionAssociation | NULL. The section entity or NULL if not found.

Overrides SectionAssociationStorageInterface::loadSection

File

src/SectionAssociationStorage.php, line 16

Class

SectionAssociationStorage
Defines section association storage.

Namespace

Drupal\workbench_access

Code

public function loadSection($access_scheme_id, $section_id) {
  $section = $this
    ->loadByProperties([
    'access_scheme' => $access_scheme_id,
    'section_id' => $section_id,
  ]);
  return current($section);
}