You are here

SectionAssociationStorage.php in Workbench Access 8

File

src/SectionAssociationStorage.php
View source
<?php

namespace Drupal\workbench_access;

use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
use Drupal\workbench_access\SectionAssociationStorageInterface;

/**
 * Defines section association storage.
 */
class SectionAssociationStorage extends SqlContentEntityStorage implements SectionAssociationStorageInterface {

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

}

Classes

Namesort descending Description
SectionAssociationStorage Defines section association storage.