*/ class ReportPanel extends Record { /** * For bc. * @todo Remove. * @var bool */ protected $forceSelectAllAttributes = true; /** * @throws Error */ protected function afterCreateEntity(Entity $entity, $data) { $this->rebuild($entity->get('entityType')); } /** * @throws Error */ protected function afterUpdateEntity(Entity $entity, $data) { $this->rebuild($entity->get('entityType')); } /** * @throws Error */ protected function afterDeleteEntity(Entity $entity) { $this->rebuild($entity->get('entityType')); } /** * @throws Error */ private function rebuild(?string $entityType = null): void { $this->injectableFactory ->create(PanelService::class) ->rebuild($entityType); } }