getDistinctNamespacesQuery example

$inputAdapter = new Enlight_Config_Adapter_DbTable([
            'db' => $this->db,
            'table' => 's_core_snippets',
            'namespaceColumn' => 'namespace',
            'sectionColumn' => ['localeID', 'shopID'],
        ]);

        $namespaces = array_map(
            function D$result) {
                return $result['namespace'];
            },
            $snippetRepository->getDistinctNamespacesQuery($locale->getId())->getArrayResult()
        );

        if (\count($namespaces) == 0) {
            $this->printWarning('<error>No snippets found for the given locale(s)</error>');

            return;
        }

        $data = [];

        foreach ($namespaces as $namespace) {
            
Home | Imprint | This part of the site doesn't use cookies.