protected function EntityWithoutBundleFormTest::getEntityTestByName in URL Alias Permissions 8
Get an entity_test by name.
Parameters
string $name: The name of the entity_test.
bool $reset: (optional) Whether to reset the entity cache.
Return value
\Drupal\Core\Entity\EntityInterface|false The entity_test when found, else FALSE.
1 call to EntityWithoutBundleFormTest::getEntityTestByName()
- EntityWithoutBundleFormTest::testPathAliasFormElementAccess in tests/
src/ Functional/ EntityWithoutBundleFormTest.php - Test if the path alias form elements is correctly hidden when no access.
File
- tests/
src/ Functional/ EntityWithoutBundleFormTest.php, line 121
Class
- EntityWithoutBundleFormTest
- Test url_alias_permissions with an entity without bundles.
Namespace
Drupal\Tests\url_alias_permissions\FunctionalCode
protected function getEntityTestByName(string $name, bool $reset = FALSE) {
if ($reset === TRUE) {
$this->entityTestStorage
->resetCache();
}
$entities = $this->entityTestStorage
->loadByProperties([
'name' => $name,
]);
return current($entities);
}