You are here

public function RoleChangeSelection::validateReferenceableEntities in Role Delegation 8

Validates which existing entities can be referenced.

Return value

array An array of valid entity IDs.

Overrides DefaultSelection::validateReferenceableEntities

File

src/Plugin/EntityReferenceSelection/RoleChangeSelection.php, line 24

Class

RoleChangeSelection
Class RoleChangeSelection.

Namespace

Drupal\role_delegation\Plugin\EntityReferenceSelection

Code

public function validateReferenceableEntities(array $ids) {
  $result = parent::validateReferenceableEntities($ids);
  if ($ids) {
    $result = array_merge($result, DelegatableRoles::$emptyFieldValue);
  }
  return $result;
}