setSection example

return;
        }

        foreach ($this->_sectionColumn as $key => $columnName) {
            switch ($columnName) {
                case 'shopID':
                case 'localeID':
                    $section[$key] = 1;
                    break;
            }
        }
        $config->setSection($section);
    }
}
foreach ($namespaces as $namespace) {
            if (!\array_key_exists($namespace$data)) {
                $data[$namespace] = true;
                $content = new Enlight_Components_Snippet_Namespace([
                    'adapter' => $inputAdapter,
                    'name' => $namespace,
                    'section' => [
                        $locale->getId(),
                    ],
                ]);

                $content->setSection($locale->getLocale());
                $outputAdapter->write($content, true);
            }
        }
    }

    /** * Loads all snippets from all files in $snippetsDir * (including subfolders) and removes them from the database. * * @param string|null $snippetsDir * @param bool $removeDirty */
$options = ['allowModifications' => $options];
        }
        if (isset($options['allowModifications'])) {
            $this->_allowModifications = (bool) $options['allowModifications'];
        }
        if (isset($options['adapter']) && $options['adapter'] instanceof Enlight_Config_Adapter) {
            $this->_adapter = $options['adapter'];
        } else {
            $this->_adapter = self::$_defaultAdapter;
        }
        if (isset($options['section'])) {
            $this->setSection($options['section']);
        }
        if (isset($options['extends'])) {
            $this->setExtends($options['extends']);
        }
        if (\is_array($config)) {
            $this->setData($config);
        } elseif ($config !== null) {
            $this->setName($config);
        } else {
            throw new Enlight_Config_Exception('Please specify configuration data');
        }
    }
if (
            !\array_key_exists($locale$fullNamespace->toArray())
            && \in_array($locale['en_GB', 'default'])
            && \count($fullNamespace->toArray())
        ) {
            $diff = array_diff(['en_GB', 'default'][$locale]);
            if ($diff !== []) {
                $locale = array_shift($diff);
            }
        }

        $fullNamespace->setSection($locale);
        $fullNamespace->setData($fullNamespace->get($locale));

        return $fullNamespace;
    }

    private function requiresFallback(Enlight_Components_Snippet_Namespace $instance): bool
    {
        if ($instance->getFallback()) {
            return false;
        }
        if (!$this->locale) {
            
$sections[$delta] = $section;
    $this->setSections($sections);
    return $this;
  }

  /** * {@inheritdoc} */
  public function appendSection(Section $section) {
    $delta = $this->count();

    $this->setSection($delta$section);
    return $this;
  }

  /** * {@inheritdoc} */
  public function insertSection($delta, Section $section) {
    // Clear the section list if there is currently a blank section.     if ($this->hasBlankSection()) {
      $this->removeAllSections();
    }

    
Home | Imprint | This part of the site doesn't use cookies.