You are here

protected function RoleSplitFilter::mergePermissions in Config Role Split 8

Do an array_merge with array_unique and sorting.

Parameters

array $original: The first array.

array $addition: The second array.

Return value

array The merged array

2 calls to RoleSplitFilter::mergePermissions()
RoleSplitFilter::filterRead in src/Plugin/ConfigFilter/RoleSplitFilter.php
RoleSplitFilter::filterWrite in src/Plugin/ConfigFilter/RoleSplitFilter.php

File

src/Plugin/ConfigFilter/RoleSplitFilter.php, line 198

Class

RoleSplitFilter
Provides a RoleSplitFilter.

Namespace

Drupal\config_role_split\Plugin\ConfigFilter

Code

protected function mergePermissions(array $original, array $addition) {
  $permissions = array_unique(array_merge($original, $addition));
  sort($permissions);
  return $permissions;
}