Skip to content
Snippets Groups Projects
Commit 75be7826 authored by catch's avatar catch
Browse files

Issue #3450890 by kristiaanvandeneynde: Provide default values for an Access...

Issue #3450890 by kristiaanvandeneynde: Provide default values for an Access Policy API method that was overlooked
parent 9935d24a
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ public function addItem(CalculatedPermissionsItemInterface $item, bool $overwrit
/**
* {@inheritdoc}
*/
public function removeItem(string $scope, string|int $identifier): self {
public function removeItem(string $scope = AccessPolicyInterface::SCOPE_DRUPAL, string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL): self {
unset($this->items[$scope][$identifier]);
return $this;
}
......
......@@ -27,13 +27,14 @@ public function addItem(CalculatedPermissionsItemInterface $item, bool $overwrit
* Removes a single calculated permission item from a given scope.
*
* @param string $scope
* The scope name to remove the item from.
* (optional) The scope name to remove the item from, defaults to 'drupal'.
* @param string|int $identifier
* The scope identifier to remove the item from.
* (optional) The scope identifier to remove the item from, defaults to
* 'drupal'.
*
* @return self
*/
public function removeItem(string $scope, string|int $identifier): self;
public function removeItem(string $scope = AccessPolicyInterface::SCOPE_DRUPAL, string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL): self;
/**
* Removes all of the calculated permission items, regardless of scope.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment