['all']] ), new TwigFunction( 'get_analytics_public_id', [$this, 'getPublicId'], ['is_safe' => ['all']] ), new TwigFunction( 'is_analytics_public_id_new', [$this, 'isPublicIdNew'], ['is_safe' => ['all']] ), ]; } private function getAnalytics() { if ($this->analytics === null) { $this->analytics = ContainerWrapper::getInstance()->get(AnalyticsGenerator::class); } if (!$this->analytics instanceof AnalyticsGenerator) { throw new InvalidStateException('AnalyticsGenerator service was not registered!'); } return $this->analytics; } public function isEnabled() { return $this->getAnalytics()->isEnabled(); } public function getPublicId() { return $this->getAnalytics()->getPublicId(); } public function isPublicIdNew() { return $this->getAnalytics()->isPublicIdNew(); } }