/** * Get the loop config of the current KoolKode loop. * * Will fall back to a shared global config when no KoolKode loop is used. * * @return LoopConfig */ protected function getLoopConfig() : LoopConfig { $loop = $this->getLoop(); if ($loop instanceof KoolLoop) { return $loop->getConfig(); } return LoopConfig::currentConfig(); }