You are here

class MatchingUnitIndex in Booking and Availability Management API 8

Same name in this branch
  1. 8 src/Plugin/Deriver/MatchingUnitIndex.php \Drupal\bat_api\Plugin\Deriver\MatchingUnitIndex
  2. 8 src/Plugin/ServiceDefinition/MatchingUnitIndex.php \Drupal\bat_api\Plugin\ServiceDefinition\MatchingUnitIndex

Hierarchy

Expanded class hierarchy of MatchingUnitIndex

File

src/Plugin/Deriver/MatchingUnitIndex.php, line 13
Contains \Drupal\bat_api\Plugin\Deriver\MatchingUnitIndex.php

Namespace

Drupal\bat_api\Plugin\Deriver
View source
class MatchingUnitIndex extends DeriverBase implements ContainerDeriverInterface {

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, $base_plugin_id) {
    return new static($container
      ->get('router.route_provider'), $container
      ->get('entity_type.manager'));
  }
  public function getDerivativeDefinitions($base_plugin_definition) {
    $entity_type_id = 'calendar-matching-units';
    $this->derivatives[$entity_type_id] = $base_plugin_definition;
    $this->derivatives[$entity_type_id]['title'] = t('Calendar matching units');
    $this->derivatives[$entity_type_id]['description'] = t('Index of units objects.');
    $this->derivatives[$entity_type_id]['category'] = t('Calendar matching units');
    $this->derivatives[$entity_type_id]['path'] = "{$entity_type_id}";
    return $this->derivatives;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition
MatchingUnitIndex::create public static function Creates a new class instance. Overrides ContainerDeriverInterface::create
MatchingUnitIndex::getDerivativeDefinitions public function Gets the definition of all derivatives of a base plugin. Overrides DeriverBase::getDerivativeDefinitions