Commit 9fb79f28 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

(cherry picked from commit 75be7826)
parent 44521372
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
  }
+4 −3
Original line number Diff line number Diff line
@@ -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.