getSectionSeparator example


    public function write(Enlight_Config $config$fields = null, $update = true, $force = false, $allowReset = false)
    {
        if (!$this->_allowWrites) {
            return $this;
        }

        $section = explode($config->getSectionSeparator()$config->getSection());
        if (!\is_array($section)) {
            return $this;
        }

        $name = $this->_namePrefix . $config->getName() . $this->_nameSuffix;
        $dbTable = $this->getTable($this->_namespaceColumn === null ? $name : null);
        $db = $dbTable->getAdapter();

        if ($fields === null) {
            $fields = $config->getDirtyFields();
        }
        
$this->overwriteWithDefaultShopValues($config);

        return parent::write($config$fields$update$force$allowReset);
    }

    /** * If there is a snippet missing, set the shopID and localeID to the main shop since all * language shops derive from it. */
    private function overwriteWithDefaultShopValues(Enlight_Config $config): void
    {
        $section = explode($config->getSectionSeparator()$config->getSection());
        if (!\is_array($section)) {
            return;
        }

        if (!\is_array($this->_sectionColumn)) {
            return;
        }

        foreach ($this->_sectionColumn as $key => $columnName) {
            switch ($columnName) {
                case 'shopID':
                
Home | Imprint | This part of the site doesn't use cookies.