protected function InlineBlockTitleAutomaticTest::reloadEntity in Inline Block Title Automatic 8
Reloads the given entity from the storage and returns it.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be reloaded.
Return value
\Drupal\Core\Entity\EntityInterface The reloaded entity.
1 call to InlineBlockTitleAutomaticTest::reloadEntity()
- InlineBlockTitleAutomaticTest::testAutomaticTitleLayoutSectionEquals in tests/
src/ Functional/ InlineBlockTitleAutomaticTest.php - Test layout builder detects equal section lists correctly.
File
- tests/
src/ Functional/ InlineBlockTitleAutomaticTest.php, line 162
Class
- InlineBlockTitleAutomaticTest
- Test the inline block automatic module.
Namespace
Drupal\Tests\inline_block_title_automatic\FunctionalCode
protected function reloadEntity(EntityInterface $entity) {
$controller = $this->container
->get('entity_type.manager')
->getStorage($entity
->getEntityTypeId());
$controller
->resetCache([
$entity
->id(),
]);
return $controller
->load($entity
->id());
}