public function WebformAccessGroup::removeEntityId in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_access/src/Entity/WebformAccessGroup.php \Drupal\webform_access\Entity\WebformAccessGroup::removeEntityId()
Remove entity id to webform access group.
Parameters
string $entity_type: The source entity type.
string $entity_id: The source entity id.
string $field_name: The source entity webform field name.
string $webform_id: The webform id.
Overrides WebformAccessGroupInterface::removeEntityId
File
- modules/
webform_access/ src/ Entity/ WebformAccessGroup.php, line 274
Class
- WebformAccessGroup
- Defines the webform access group entity.
Namespace
Drupal\webform_access\EntityCode
public function removeEntityId($entity_type, $entity_id, $field_name, $webform_id) {
$entity = "{$entity_type}:{$entity_id}:{$field_name}:{$webform_id}";
foreach ($this->entityIds as $index => $entityId) {
if ($entity === $entityId) {
unset($this->entityIds[$index]);
}
}
$this->entityIds = array_values($this->entityIds);
return $this;
}