You are here

public function RestMenuItemsCacheableDependency::__construct in Rest menu items 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/rest/resource/RestMenuItemsCacheableDependency.php \Drupal\rest_menu_items\Plugin\rest\resource\RestMenuItemsCacheableDependency::__construct()

RestMenuItemsCachableDependency constructor.

Parameters

int $minDepth The minimum depth to be used as a cache context:

int $maxDepth The maximum depth to be used as a cache context:

File

src/Plugin/rest/resource/RestMenuItemsCacheableDependency.php, line 25

Class

RestMenuItemsCacheableDependency

Namespace

Drupal\rest_menu_items\Plugin\rest\resource

Code

public function __construct($menuName, $minDepth, $maxDepth) {
  $this->menuName = $menuName;
  $this->minDepth = $minDepth;
  $this->maxDepth = $maxDepth;
}