public static function Formatter::postLoad in Custom Formatters 8.3
Acts on loaded entities.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.
Overrides EntityBase::postLoad
File
- src/
Entity/ Formatter.php, line 115
Class
- Formatter
- Defines the formatter entity.
Namespace
Drupal\custom_formatters\EntityCode
public static function postLoad(EntityStorageInterface $storage, array &$entities) {
/** @var \Drupal\custom_formatters\FormatterInterface $entity */
foreach ($entities as $entity) {
if ($entity
->getFormatterType()) {
$entity
->getFormatterType()
->postLoad();
}
}
parent::postLoad($storage, $entities);
}