Renders components related to specified section.

By default components without specified section will be rendered.

@param string|null $sectionName
@return string
772933
public function renderComponents($sectionName = null)
    {
        $output = '';
        $components = $this->getSectionComponents($sectionName);
        foreach ($components as $component) {
            $output .= $component->render();
        }
        return $output;
    }
221803
public function render($templateName = null, $data = [])
    {
        $this->setTemplate($templateName, $data);

        if (empty($this->_templateName)) {
            if (defined('FOCUS_DEBUG') && FOCUS_DEBUG) {
                $this->getLogger()->debug('template name is null');
            }

            throw new \RuntimeException('TEMPLATE_IS_NULL');
        }
        $buffer = $this->_parseTemplate($this->_templateName, $this->_data);
        if (!empty($this->_layout)) {
            if (defined('FOCUS_DEBUG') && FOCUS_DEBUG) {
                $this->getLogger()->debug('loading layout: '.$this->_layout);
            }

            $buffer = $this->_parseTemplate(
                $this->_layout,
                array_merge($this->_data, ['__body__' => $buffer])
            );
        }

        return $buffer;
    }
271143
protected function buildSection($sectionName, array $sectionDefinition): SectionInterface
    {
        $section = $this->sectionBuilder->buildSection($sectionName, $sectionDefinition);

        foreach ($this->filterCommands($sectionDefinition) as $commandName => $commandDefinition) {
            $section->addCommand($this->commandBuilder->buildCommand($commandName, $commandDefinition));
        }

        return $section;
    }
972532
public function renderSection(Section $section)
    {
        $output = sprintf("[%s]\n", $section->getName());

        foreach ($section->getProperties() as $key => $value) {
            $value = $this->normalizeValue($value);
            $output .= sprintf("%s = %s\n", $key, $value);
        }

        // Write a linefeed after sections
        $output .= "\n";

        return $output;
    }
858965
public static function normalize_componentname($componentname) {
        list($plugintype, $pluginname) = self::normalize_component($componentname);
        if ($plugintype === 'core' && is_null($pluginname)) {
            return $plugintype;
        }
        return $plugintype . '_' . $pluginname;
    }
212728
public function renderContent($layout = null, $title = null)
    {
        if ($this->hasSourceComponent()) {
            return $this->SourceComponent()->renderContent($layout, $title);
        }
        
        return parent::renderContent($layout, $title);
    }
944761
public function InSection($sectionName) {
		$page = Director::get_current_page();
		while($page) {
			if($sectionName == $page->URLSegment)
				return true;
			$page = $page->Parent;
		}
		return false;
	}
477235
public function viewAction(Section $section): Response
    {
        $sectionDeleteForm = $this->formFactory->deleteSection(
            new SectionDeleteData($section)
        )->createView();

        return $this->render('@ezdesign/admin/section/view.html.twig', [
            'section' => $section,
            'form_section_delete' => $sectionDeleteForm,
            'deletable' => !$this->sectionService->isSectionUsed($section),
            'can_edit' => $this->isGranted(new Attribute('section', 'edit')),
        ]);
    }
466746
public function get(string $section, string $key, $default = null)
    {
        return $this->config->get($this->concat($section, $key), $default);
    }
1198881
public function renderSectionBody(array $section, DataCollection $collection, array $sections = [], string $sectionName = '') : void
    {
        foreach ($this->writers as $writer) {
            $writer->renderSectionBody($section, $collection, $sections, $sectionName);
        }
    }
141609
private function start($sectionName)
    {
        if (null !== $this->activeSectionName) {
            throw new TplException(sprintf('section "%s" already started', $this->activeSectionName));
        }

        $this->activeSectionName = $sectionName;
        ob_start();
    }
291543
function renderHeader(&$header)
    {
        $this->_ary['sections'][$this->_sectionCount] = array(
            'header' => $header->toHtml(),
            'name'   => $header->getName()
        );
        $this->_currentSection = $this->_sectionCount++;
    }
912547
protected function shouldBeIncluded(string $sectionName): bool
    {
        return (count($this->includeExcluded) > 0 && in_array($sectionName, $this->includeExcluded));
    }
1232438
public function delete($key, $section = null)
    {
        if (is_null($section)) {
            $pieces = explode('.', $key);
            $section = $pieces[0];
            $key = $pieces[1];
        }
        return $this->model->deleteSetting($section, $key);
    }
1160686
protected function findClass($name, $sectionName)
    {
        $file = $this->projectRoot.DIRECTORY_SEPARATOR.$name;
        if (strpos($file, '.php') > 0) {
            if (file_exists($file)) {
                require_once $file;
                $parts = explode(DIRECTORY_SEPARATOR, $file);
                $lastPart = array_pop($parts);

                return str_replace('.php', '', $lastPart);
            } else {
                throw new \Liip\RMT\Exception("Impossible to open [$file] please review your config");
            }
        }

        return $this->findInternalClass($name, $sectionName);
    }
1328410
public function renderComponent()
    {
        $name = array_pop($this->componentStack);

        return $this->render($name, $this->componentData($name));
    }
8837
public function getAllBySection($section, $default = null)
    {
        $items = $this->getSettingsConfig();

        if (isset($items[$section])) {
            $this->setting = ArrayHelper::getColumn($items[$section], 'value');
        } else {
            $this->setting = $default;
        }

        return $this->setting;
    }