public function updateEntityCount() { $neueAnzahl = Kommentar::count(['tabelle' => $this->ko_element_tabelle, 'element_id' => $this->ko_element_id]); // hier muss man jetzt eigentlich den Count ehöhen /** @var KommentarInterface $entity */ $entity = new $this->ko_element_tabelle($this->ko_element_id); if ($entity instanceof KommentarInterface) { $entity->updateKommentarCount($neueAnzahl); } }