Activates a setting

@param $key
@param null|string $section
@return bool
9388
public function activate($key, $section = null)
    {
        if (is_null($section)) {
            $pieces = explode('.', $key);
            $section = $pieces[0];
            $key = $pieces[1];
        }
        return $this->model->activateSetting($section, $key);
    }
123558
public function get($section, $key){
		if(!isset($this->configValues[$section][$key])){
			return false;
		}
		return $this->configValues[$section][$key];
	}
844423
public function setSection(\Coral\ContentBundle\Entity\Section $section)
    {
        $this->section = $section;

        return $this;
    }
184906
public function has($section, $key): bool
    {
        $setting = $this->get($section, $key);

        return !empty($setting);
    }
1224469
public function set($key, $value, $section = null, $type = null)
    {
        if (is_null($section)) {
            $pieces = explode('.', $key);
            $section = $pieces[0];
            $key = $pieces[1];
        }

        if ($this->model->setSetting($section, $key, $value, $type)) {
            return true;
        }
        return false;
    }
45715
public function isConfigured(array $keys, string $section): bool
    {
        if (!array_key_exists($section, $this->configuration)) {
            return false;
        }

        return !array_diff_key(array_flip($keys), $this->configuration[$section]);
    }
695870
protected function populate($section = null)
    {
        $event = new SitemapPopulateEvent($this, $section);
        $this->dispatcher->dispatch(SitemapPopulateEvent::ON_SITEMAP_POPULATE, $event);
    }
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]);
                }
            }
        }
    }
918518
public function delete(string $section, string $key) : bool
    {
        if (!$this->cacheStore->delete($section . $this->sectionKeyDelimiter . $key)) {
            // Unlikely, but safer.
            throw new RuntimeException(
                'Underlying cache store type[' . get_class($this->cacheStore)
                . '] failed to delete cache item, concatted[' . $section . $this->sectionKeyDelimiter . $key . '].'
            );
        }
        return true;
    }
581955
public function setConfigValue( $section, $key, $value )
	{
		$this->config[$section][$key] = $value;
		$this->write();
	}
117861
public function parseValue(string $section, string $key, $default = null)
    {
        if (isset($this->propertyData[$section]) && isset($this->propertyData[$section][$key])) {
            if ($this->propertyData[$section][$key] instanceof Secret) {
                return $this->propertyData[$section][$key];
            }

            return Parse::toType($this->propertyData[$section][$key]);
        }

        return $default;
    }
983233
public function getCache($sectionKey, &$section)
    {
        do_action("before_theme_get_cache", $sectionKey);

        $cacheKey = $this->getCacheKey($sectionKey, $section);

        # Get cache file absolute path
        $file = $this->getCacheFile($cacheKey);

        # Define variable with false
        $cache = false;

        $cacheConfig = $this->getConfig("cache");

        # TODO: When not redis, than wp_cache wont load from cache
        # Get cached html depending on cache type
        if ($cacheConfig["type"] == "wp_cache"):
            $cache = wp_cache_get(basename($file), "sections_cache");
        else:
            if (file_exists($file) && (time() - filemtime($file) < $cacheConfig["lifetime"])):
                $cache = file_get_contents($file);
            endif;
        endif;

        do_action("after_ntl_get_cache", $cache);

        # Return cached html
        return $cache;
    }
1214894
function hasSection( $sectionName )
    {
        return ( isset( $this->BlockValues[$sectionName] )
            || isset( self::$injectedSettings[$this->FileName][$sectionName] ) );
    }
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;
    }
509534
public function setComment( $key, $comment, $section = NULL )
	{
		if( $this->usesSections() )
		{
			if( !$this->hasProperty( $key, $section ) )
				throw new InvalidArgumentException( 'Key "'.$key.'" is not existing in Section "'.$section.'".' );
			$this->comments[$section][$key] = $comment;
		}
		else
		{
			if( !$this->hasProperty( $key ) )
				throw new InvalidArgumentException( 'Key "'.$key.'" is not existing' );
			$this->comments[$key] = $comment;
		}
		return is_int( $this->write() );
	}
250321
public function startSection($section, $default = null)
    {
        $context = $this->_context;

        if ($default === null) {
            ob_start();
            ob_implicit_flush(false);
            $context->stack[] = $section;
        } else {
            $context->sections[$section] = $default;
        }
    }
491393
def key_exists(self, section, key):
        

        LOGGER.debug("> Checking '{0}' key existence in '{1}' section.".format(key, section))

        self.__settings.beginGroup(section)
        exists = self.__settings.contains(key)
        self.__settings.endGroup()
        return exists