The current section the site is in. This can be one or more values. Think of it like a server-side css-class.
@since 2.1
@param string $Section The name of the section
@param string $Method One of:
- add
- remove
- set
- get
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);
      }
   }
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;
    }
402327
public function setMethod($method)
	{
		parent::setMethod($method);
		$method = strtolower($method);
		if($method == "aes-256-ecb")
		{
			$this->_type = MCRYPT_RIJNDAEL_128;
			$this->_mode = "ecb";
		}
		elseif($method == "aes-256-cbc")
		{
			$this->_type = MCRYPT_RIJNDAEL_128;
			$this->_mode = "cbc";
		}
	}
71826
public void setSection (Section section)
    {
        _sections.put(key(section.x, section.y), section);
    }
234605
public function section($name)
    {
        if (isset($this->sections[$name])) {
            $section = $this->sections[$name];
            unset($this->sections[$name]);
        } else {
            $section = new Section($name);
        }

        $this->sections[$name] = $section;

        $section->start();
    }
119212
public static function append($section, $content)
	{
		if (isset(static::$sections[$section]))
		{
			static::$sections[$section] .= $content;
		}
		else
		{
			static::$sections[$section] = $content;
		}
	}
78377
public function isSectionUsed(Section $section)
    {
        return $this->sectionHandler->assignmentsCount($section->id) > 0 ||
               $this->sectionHandler->policiesCount($section->id) > 0 ||
               $this->sectionHandler->countRoleAssignmentsUsingSection($section->id) > 0;
    }
20507
public function addSection($key, $value = null)
    {
        if ($key instanceof Section) {
            $section = $key;
            $this->sections[$section->getKey()]
                = $section->getValue();
            return;
        }
        $this->sections[$key] = (string)$value;
    }
245907
public function removeSection(\Coral\ContentBundle\Entity\Section $sections)
    {
        $this->sections->removeElement($sections);
    }
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');
    }
219552
public function startSection($section, $content = null)
    {
        if ($content === null) {
            if (ob_start()) {
                $this->sectionStack[] = $section;
            }
        } else {
            $this->extendSection($section, e($content));
        }
    }
661707
public function remove($section, $key)
    {
        if ($section == '') {
            throw new RuntimeException("Section not set.");
        }
        if (null === $key || ($key == '')) {
            // remove entire section
            foreach ($this->lines as $linenum => $line) {
                if ($line['section'] == $section) {
                    unset($this->lines[$linenum]);
                }
            }
        } else {
            foreach ($this->lines as $linenum => $line) {
                if (($line['section'] == $section)
                    && (isset($line['key']))
                    && ($line['key'] == $key)
                ) {
                    unset($this->lines[$linenum]);
                }
            }
        }
    }
669987
protected function setPostCommand(SectionInterface $section, array $definition)
    {
        if (isset($definition[static::CONFIG_POST_COMMAND])) {
            $section->setPostCommand($definition[static::CONFIG_POST_COMMAND]);
        }
    }
807552
public function setFormMethod($method)
    {
        $methods = [
            'post',
            'get'
        ];

        // Safety first. Only allow 'post' or 'get' here.
        if (! in_array($method, $methods)) {
            Throw new FormException('Wrong method set.');
        }

        $this->attribute['formmethod'] = $method;

        return $this;
    }
714006
public function youTryToGetSettingWithinSection($setting, $section)
    {
        $this->responseValue = $this->settingService->section($section)->get($setting, 'null');
    }
709195
public function is_current_section()
    {
        if( !isset( $this->active ) )
        {
            $this->active = filter_input(INPUT_GET, 'section') == $this->get_slug();
        }
        return $this->active;
    }
944761
public function InSection($sectionName) {
		$page = Director::get_current_page();
		while($page) {
			if($sectionName == $page->URLSegment)
				return true;
			$page = $page->Parent;
		}
		return false;
	}