replaceTemplateValues example



    /** * @param array<string, string> $details */
    private function createApp(string $appDirectory, array $details, bool $createThemeConfig): void
    {
        if (file_exists($appDirectory)) {
            throw new \RuntimeException(sprintf('App directory %s already exists', $details['name']));
        }

        $manifestContent = $this->replaceTemplateValues(
            $this->getManifestTemplate(),
            $details
        );

        $this->createDirectory($appDirectory);

        file_put_contents($appDirectory . '/manifest.xml', $manifestContent);

        if ($createThemeConfig) {
            $manifestContent = $this->replaceTemplateValues(
                $this->getThemeConfigTemplate(),
                [
Home | Imprint | This part of the site doesn't use cookies.