function ActionResourceTestBase::createEntity
Same name in this branch
- 10 core/modules/action/tests/src/Functional/Rest/ActionResourceTestBase.php \Drupal\Tests\action\Functional\Rest\ActionResourceTestBase::createEntity()
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php \Drupal\Tests\system\Functional\Rest\ActionResourceTestBase::createEntity()
- 8.9.x core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php \Drupal\Tests\system\Functional\Rest\ActionResourceTestBase::createEntity()
- 11.x core/modules/action/tests/src/Functional/Rest/ActionResourceTestBase.php \Drupal\Tests\action\Functional\Rest\ActionResourceTestBase::createEntity()
- 11.x core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php \Drupal\Tests\system\Functional\Rest\ActionResourceTestBase::createEntity()
Overrides EntityResourceTestBase::createEntity
File
-
core/
modules/ system/ tests/ src/ Functional/ Rest/ ActionResourceTestBase.php, line 38
Class
Namespace
Drupal\Tests\system\Functional\RestCode
protected function createEntity() {
$action = Action::create([
'id' => 'user_add_role_action.' . RoleInterface::ANONYMOUS_ID,
'type' => 'user',
'label' => t('Add the anonymous role to the selected users'),
'configuration' => [
'rid' => RoleInterface::ANONYMOUS_ID,
],
'plugin' => 'user_add_role_action',
]);
$action->save();
return $action;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.