Set slugs to each section, according the number of sections.
351036
private function set_section_slugs()
    {
        // For more than 1 sections, set section specific slugs
        if( count( $this->sections ) > 1 )
        {
            foreach( $this->sections as $section )
            {
                $section->set_slug( \Amarkal\Common\Tools::strtoslug( $section->title ) );
            }
        }
        
        // For a single section, use the page's title as the slug
        else
        {
            $this->sections[0]->set_slug( \Amarkal\Common\Tools::strtoslug( $this->title ) );
        }
    }
1160014
def set_emissions(self, scenario):
        """"""
        for section in emissions:
            for source in emissions[section]:
                if source not in scenario.columns:
                    continue
                self._set_timed_array(
                    section, source, list(scenario.index), list(scenario[source])
                )
927294
def set_ownership(self):
        """"""
        assert self.section is not None

        for t in self.children:
            t.parent = self
            t._section = self.section
            t.doc = self.doc
            t.set_ownership()
6646
public void setSections(final List<Section> SECTIONS) {
        sections.setAll(SECTIONS);
        Collections.sort(sections, new SectionComparator());
        fireUpdateEvent(SECTION_EVENT);
    }
1203082
public function setSlug($slug)
    {
        if(empty($this->fields['Slug']) || empty($this->fields['OriginalSlug']))
        {
            $this->fields['NodeRef'] = new NodeRef($this->getNodeRef()->getElement(), $slug);
        }

        $this->fields['Slug'] = $slug;
    }
543960
public function flushSections()
    {
        $this->renderCount = 0;

        $this->sections = [];
        $this->sectionStack = [];

        $this->pushes = [];
        $this->pushStack = [];
    }
256908
public function set_data( $data ) {

		if ( ! empty( $data[ $this->slug ] ) ) {
			foreach ( $this->child as $child ) {
				if ( method_exists( $child, 'set_data' ) ) {
					$child->set_data( $data[ $this->slug ] );
				}
			}
			$this->data = $data[ $this->slug ];
		}

	}
907181
def _add_sections(self):
        ''''''
        for section in self.template_sections:
            try:
                sec_start = self._get_section_start_index(section)
            except NonextantSectionException:
                if section in self.sections_not_required:
                    continue
                raise
            sec_end = self._get_section_end_index(section, sec_start)
            section_value = self.template_str[sec_start+1:sec_end].strip()
            section, section_value = self._transform_key_value(
                section,
                section_value,
                self.section_map
            )
            self.templ_dict['actions']['definition'][section] = section_value
            self.template_str = self.template_str[:sec_start+1] + \
                self.template_str[sec_end:]
309102
public function setSection(Section $section)
    {
        if ($section !== $this->_mainsection) {
            $this->_mainsection = null;
            $this->_level = $section->getLevel() + 1;
            if (0 === $this->_position) {
                $this->_position = 1;
            }
        }

        $this->_section = $section;

        return $this;
    }
1231141
private function updateSections()
    {
        $sections = $this->repo->findAll();
        foreach ($sections as $section) {
            PageListener::setSectionHasChildren($this->em, $section);
        }
        $this->em->flush();

        return $this;
    }
1186818
public void setSections(Section... SECTIONS_ARRAY) {
        sections.clear();
        for (Section section : SECTIONS_ARRAY) {
            sections.add(new Section(section.getStart(), section.getStop(), section.getColor()));
        }
        validate();
        fireStateChanged();
    }
1287243
def save(self, *args, **kwargs):
        """"""

        if not self.slug:
            self.slug = slugify(self.name)

        section = super(Section, self).save(*args, **kwargs)

        if self.query and self.query != {}:
            self._save_percolator()

        return section
1233463
public void setCategories(List<CmsCategory> categories) {

        for (int i = 0; i < categories.size(); i++) {
            CmsCategory cat = categories.get(i);
            m_container.addItem(cat);
            m_checkboxes.put(cat, new CheckBox());
            String parentPath = CmsResource.getParentFolder(cat.getPath());
            if (parentPath.length() > 1) {
                for (int j = i - 1; j >= 0; j--) {
                    if (categories.get(j).getPath().equals(parentPath)) {
                        m_container.setParent(cat, categories.get(j));
                        break;
                    }
                }
            }
        }
        // hide openers
        for (CmsCategory cat : categories) {
            if ((m_container.getChildren(cat) == null) || (m_container.getChildren(cat).size() == 0)) {
                m_container.setChildrenAllowed(cat, false);
            }
        }
    }
822784
public function setSections(array $sections)
    {
        foreach ($sections as $key => $config) {
            // Watch out for old config data that's not updated yet
            if (!isset($config['sectionUid'])) {
                continue;
            }

            // Ignore sections that don't allow guest submissions
            if ($config['allowGuestSubmissions']) {
                $this->_sections[$config['sectionUid']] = new SectionSettings($config);
            } else {
                unset($this->_sections[$config['sectionUid']]);
            }
        }
    }
50491
protected function setupSections()
	{
		if(version_compare(VERSION, '3.3', '<')) {
			if(!isset($GLOBALS['TL_CONFIG']['customSections']) || $GLOBALS['TL_CONFIG']['customSections'] == '') {
				$GLOBALS['TL_CONFIG']['customSections'] = 'bootstrap';
			}
			elseif(strpos($GLOBALS['TL_CONFIG']['customSections'], 'bootstrap') === false) {
				$GLOBALS['TL_CONFIG']['customSections'] .= ',bootstrap';
			}

			$config = \Config::getInstance();
			$config->add('$GLOBALS[\'TL_CONFIG\'][\'customSections\']', $GLOBALS['TL_CONFIG']['customSections']);
			$config->save();

		}
	}
921404
public void setTickMarkSections(final List<Section> SECTIONS) {
        tickMarkSections.setAll(SECTIONS);
        Collections.sort(tickMarkSections, new SectionComparator());
        fireUpdateEvent(REDRAW_EVENT);
    }
803366
public function populate_slots_with_sections() {
        $sections = array_values($this->sections);
        foreach ($sections as $i => $section) {
            if (isset($sections[$i + 1])) {
                $section->lastslot = $sections[$i + 1]->firstslot - 1;
            } else {
                $section->lastslot = count($this->slotsinorder);
            }
            for ($slot = $section->firstslot; $slot <= $section->lastslot; $slot += 1) {
                $this->slotsinorder[$slot]->section = $section;
            }
        }
    }