@param \Symfony\Component\HttpFoundation\Request $request
@param \eZ\Publish\API\Repository\Values\Content\Section $section

@return \Symfony\Component\HttpFoundation\Response
357143
public function updateAction(Request $request, Section $section): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('section', 'edit'));
        $form = $this->formFactory->updateSection(
            new SectionUpdateData($section)
        );
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $data = $form->getData();
            try {
                $sectionUpdateStruct = $this->sectionUpdateMapper->reverseMap($data);
                $section = $this->sectionService->updateSection($data->getSection(), $sectionUpdateStruct);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Section '%name%' updated.") */
                        'section.update.success',
                        ['%name%' => $section->name],
                        'section'
                    )
                );

                return new RedirectResponse($this->generateUrl('ezplatform.section.view', [
                    'sectionId' => $section->id,
                ]));
            } catch (Exception $e) {
                $this->notificationHandler->error($e->getMessage());
            }
        }

        return $this->render('@ezdesign/admin/section/update.html.twig', [
            'section' => $section,
            'form_section_update' => $form->createView(),
        ]);
    }
1113725
private function resolverType(string $section, string $key)
    {
        return $this->typeRegistry->get(
            $this->schemaRegistry->get($section, $key)->getType()
        );
    }
584719
public function setProperty( $key, $value, $section = NULL )
	{
		if( $this->usesSections() )
		{
			if( $this->hasSection( $section ) && $this->hasProperty( $key, $section ) )
				$this->properties[$section][$key] = $value;
			else
				$this->addProperty( $key, $value, FALSE, TRUE, $section );
		}
		else
		{
			if( $this->hasProperty( $key ) )
				$this->properties[$key] = $value;
			else
				$this->addProperty( $key, $value, FALSE, TRUE );
		}
		return is_int( $this->write() );
	}
1126433
private function section($sectionName)
    {
        if (!\array_key_exists($sectionName, $this->sectionList)) {
            throw new TplException(sprintf('section "%s" does not exist', $sectionName));
        }

        return $this->sectionList[$sectionName];
    }
1291791
protected function sessionSection(Request $request): SectionInterface
    {
        if (empty($request->getAttribute(SessionStarter::ATTRIBUTE))) {
            throw new AuthException("Unable to use authorization thought session, no session exists");
        }

        /** @var SessionInterface $session */
        $session = $request->getAttribute(SessionStarter::ATTRIBUTE);

        return $session->getSection($this->section);
    }
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);
    }
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;
    }
360014
public function regionEditAction(Request $request, Region $region)
    {
        $form = $this->get('cms.region')->createForm($region);

        if ($request->isMethod('POST')) {
            $form->handleRequest($request);

            if ($request->request->has('update')) {
                if ($form->isValid()) {
                    $this->get('cms.region')->update($form->getData());
                    $this->addFlash('success', 'Область обновлена.');

                    return $this->redirect($this->generateUrl('cms_admin_structure_region'));
                }
            } elseif ($request->request->has('delete')) {
                $region = $form->getData();

                if ('content' == $region->getName()) {
                    $this->addFlash('error', 'Нельзя удалить область content');
                } elseif (0 < $this->get('cms.node')->countInRegion($region)) {
                    $this->addFlash('error', 'Нельзя удалить область пока в неё включены модули');
                } else {
                    $this->get('cms.region')->remove($region);
                    $this->addFlash('success', 'Область удалена.');

                    return $this->redirect($this->generateUrl('cms_admin_structure_region'));
                }
            }
        }

        return $this->render('CMSBundle:AdminStructure:region_edit.html.twig', [
            'form' => $form->createView(),
        ]);
    }
360402
public function setSection($section)
    {
        $this->section = $section;
        if($section) {
        	$section->getSectionConfig()->setPage($this);
        }

        return $this;
    }
121863
public function startSection($section, $content = '')
    {
        if (! empty($content)) {
            $this->extendSection($section, $content);
        } else if (ob_start()) {
            $this->sectionStack[] = $section;
        }
    }
5785
public static function Section($Section, $Method = 'add') {
      $Section = array_fill_keys((array)$Section, TRUE);
      
      
      switch (strtolower($Method)) {
         case 'add':
            self::$_Section = array_merge(self::$_Section, $Section);
            break;
         case 'remove':
            self::$_Section = array_diff_key(self::$_Section, $Section);
            break;
         case 'set':
            self::$_Section = $Section;
            break;
         case 'get':
         default:
            return array_keys(self::$_Section);
      }
   }
1293878
public function store(Page $page, PageSectionFormRequest $request)
    {
        $section = $this->repository->create($request->all());
        Pages::forgetCache();

        return $this->redirect($request, $section);
    }
721625
public function section_availability($section) {
        $context = context_course::instance($section->course);
        $canviewhidden = has_capability('moodle/course:viewhiddensections', $context);
        return html_writer::div($this->section_availability_message($section, $canviewhidden), 'section_availability');
    }
12585
public function bulkDeleteAction(Request $request): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('section', 'edit'));
        $form = $this->formFactory->deleteSections(
            new SectionsDeleteData()
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (SectionsDeleteData $data) {
                foreach ($data->getSections() as $sectionId => $selected) {
                    $section = $this->sectionService->loadSection($sectionId);
                    $this->sectionService->deleteSection($section);

                    $this->notificationHandler->success(
                        $this->translator->trans(
                            /** @Desc("Section '%name%' removed.") */
                            'section.delete.success',
                            ['%name%' => $section->name],
                            'section'
                        )
                    );
                }
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('ezplatform.section.list'));
    }
188239
public function listSections(Request $request)
    {
        if ($request->query->has('identifier')) {
            $sections = array(
                $this->loadSectionByIdentifier($request),
            );
        } else {
            $sections = $this->sectionService->loadSections();
        }

        return new Values\SectionList($sections, $request->getPathInfo());
    }
666484
public function section($section, $position = null)
    {
        if (is_string($section)) {
            $section = new FormSection($section);
        }

        return null !== $position ? $this->insert($section, $position) : $this->push($section);
    }
292768
public function addSection(PHPRtfLite_Container_Section $section = null)
    {
        if ($section === null) {
            $section = new PHPRtfLite_Container_Section($this);
        }

        $this->_sections[] = $section;

        return $section;
    }