protected function DomainAccessEntityCrudTest::deleteDomainAccessFields in Domain Access 8
Delete domain access fields.
Parameters
string $entity_type: Entity type.
string $bundle: Entity type bundle.
4 calls to DomainAccessEntityCrudTest::deleteDomainAccessFields()
- DomainAccessEntityCrudTest::testNodeCreateWithUninstalledDomainAccessFields in domain_access/
tests/ src/ Kernel/ DomainAccessEntityCrudTest.php - Tests node creation with uninstalled domain access fields.
- DomainAccessEntityCrudTest::testNodeUpdateWithUninstalledDomainAccessFields in domain_access/
tests/ src/ Kernel/ DomainAccessEntityCrudTest.php - Tests node update with uninstalled domain access fields.
- DomainAccessEntityCrudTest::testUserCreateWithUninstalledDomainAccessFields in domain_access/
tests/ src/ Kernel/ DomainAccessEntityCrudTest.php - Tests user creation with uninstalled domain access fields.
- DomainAccessEntityCrudTest::testUserUpdateWithUninstalledDomainAccessFields in domain_access/
tests/ src/ Kernel/ DomainAccessEntityCrudTest.php - Tests user update with uninstalled domain access fields.
File
- domain_access/
tests/ src/ Kernel/ DomainAccessEntityCrudTest.php, line 69
Class
- DomainAccessEntityCrudTest
- Tests creation of nodes and users before and after deleting required fields.
Namespace
Drupal\Tests\domain_access\KernelCode
protected function deleteDomainAccessFields($entity_type, $bundle) {
$fields = [
DomainAccessManagerInterface::DOMAIN_ACCESS_FIELD,
DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD,
];
foreach ($fields as $field_name) {
FieldConfig::loadByName($entity_type, $bundle, $field_name)
->delete();
}
}