validateAppSnippets example

'SELECT app_administration_snippet.value FROM locale INNER JOIN app_administration_snippet ON locale.id = app_administration_snippet.locale_id INNER JOIN app ON app_administration_snippet.app_id = app.id WHERE locale.code = :code AND app.active = 1;',
            ['code' => $locale]
        );

        $snippets = [];
        foreach ($result as $data) {
            $decodedSnippet = json_decode((string) $data['value'], true, 512, \JSON_THROW_ON_ERROR);
            $this->validateAppSnippets($existingSnippets$decodedSnippet);
            $decodedSnippet = $this->sanitizeAppSnippets($decodedSnippet);

            $snippets = [...$snippets, ...$decodedSnippet];
        }

        return $snippets;
    }

    /** * @param array<string, mixed> $existingSnippets * @param array<string, mixed> $appSnippets */
Home | Imprint | This part of the site doesn't use cookies.