It configures all the next chains with those default values.<br>
For example, we could force to be required always.
@param bool $ifFailThenDefault
@param bool $ifRequired The field must be fetched, otherwise it generates an error
974406
public function configChain($ifFailThenDefault=false,$ifRequired=false) {
		$this->defaultIfFail=$ifFailThenDefault;
		$this->defaultRequired=$ifRequired;
	}
1121468
private function _checkSwitchDefaultOrder() {
		if ($this->_isActive('switchDefaultOrder')) {
			if ($this->statementStack->getCurrentStackItem()->switchHasDefault) {
				// The default flag is already set, it means that a previous case case a default
				$this->_writeError('switchDefaultOrder', $this->_getMessage('SWITCH_DEFAULT_ORDER'));
			}
		}
	}
409071
public function Configure($Offset, $Limit, $TotalRecords, $Url, $ForceConfigure = FALSE) {
      if ($this->_PropertiesDefined === FALSE || $ForceConfigure === TRUE) {
         if (is_array($Url)) {
            if (count($Url) == 1)
               $this->UrlCallBack = array_pop($Url);
            else
               $this->UrlCallBack = $Url;
         } else {
            $this->Url = $Url;
         }

         $this->Offset = $Offset;         
         $this->Limit = is_numeric($Limit) && $Limit > 0 ? $Limit : $this->Limit;
         $this->TotalRecords = $TotalRecords;
         $this->_LastOffset = $this->Offset + $this->Limit;
         $this->_Totalled = ($this->TotalRecords >= $this->Limit) ? FALSE : TRUE;
         if ($this->_LastOffset > $this->TotalRecords)
            $this->_LastOffset = $this->TotalRecords;
               
         $this->_PropertiesDefined = TRUE;
         
         Gdn::Controller()->EventArguments['Pager'] = $this;
         Gdn::Controller()->FireEvent('PagerInit');
      }
   }
1184207
public function autodetect_on_failure($use_default = true)
    {
        if ($use_default) {
            return isset($this->autodetect_on_failure) ? $this->autodetect_on_failure : $this->default_autodetect_on_failure;
        }

        return $this->autodetect_on_failure;
    }
294350
@Override
    public ChainableEvent onFailure(Event onFailureEvent) {
        this.onFailureChains.add(new ChainLink()
                .onFailure(linkChainIdentifier(onFailureEvent)));
        return this;
    }
369030
protected function verifyFieldRequirements()
    {
        if (isset($this->requiredFields)) {
            $this->requiredFields->setIteratorClass('RecursiveArrayIterator');

            $iterator = new \RecursiveIteratorIterator($this->requiredFields->getIterator());

            foreach ($iterator as $fieldName) {
                if (empty($this->$fieldName)) {
                    throw new \Genesis\Exceptions\ErrorParameter(
                        sprintf('Empty (null) required parameter: %s', $fieldName)
                    );
                }
            }
        }
    }
1304185
public function setLgDependent($isLgDependent)
    {
        $this->getImplementation()->setLgDependent($this, $isLgDependent);
    	$this->lgDependent = $isLgDependent;
    }
264583
public function update(Expression $condition, Expression $ifTrue = null, Expression $ifFalse)
    {
        if ($this->condition === $condition
                && $this->ifTrue === $ifTrue
                && $this->ifFalse === $ifFalse
        ) {
            return $this;
        }

        return new self($condition, $ifTrue, $ifFalse);
    }
372134
public function forceDefault($bForceDefault = null)
    {
        if (null === $bForceDefault) {
            return $this->getForceDefault();
        }

        return $this->setForceDefault($bForceDefault);
    }
404699
public function setDefaultValue($defaultValue)
    {
        $formDefinition = $this->getRootForm();
        $formDefinition->addElementDefaultValue($this->identifier, $defaultValue);
    }
542888
public function setDefault($default = null)
    {
        if (self::REQUIRED === $this->mode && null !== $default) {
            throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
        }

        if ($this->isArray()) {
            if (null === $default) {
                $default = [];
            } elseif (!\is_array($default)) {
                throw new LogicException('A default value for an array argument must be an array.');
            }
        }

        $this->default = $default;
    }
998542
public function defaultNextEvent () {
		if ($this->isError()) {
			$this->setUrl($this->getErrorNextUrl());
			$this->nextRule		= $this->getErrorNextRule();
		} else {
			$this->setUrl($this->getDefaultNextUrl());
			$this->nextRule		= $this->getDefaultNextRule();
		}
	}
591960
public boolean validateSF(SF sf, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(sf, diagnostics, context);
	}
848105
public function markErrorIf($condition, $unlessNull=true){
        if($condition && ($this->value !==null || !$unlessNull)){
            list(, $caller) = debug_backtrace(false);
            $this->errors[$this->field] = $caller['function'];
        }
        return $this;
    }
1218458
public function setSharedByDefault($sharedByDefault)
    {
        if ($this->locked) {
            throw new Exception\LockedContainerException();
        }

        $this->sharedByDefault = (bool) $sharedByDefault;

        return $this;
    }
1066172
public function setTemplateDefinition(TemplateDefinition $templateDefinition, $fallbackToDefaultTemplate = false)
    {
        $this->templateDefinition = $templateDefinition;

        $this->fallbackToDefaultTemplate = $fallbackToDefaultTemplate;

        // Clear the current Smarty template path list
        $this->setTemplateDir(array());

        // -------------------------------------------------------------------------------------------------------------
        // Add current template and its parent to the registered template list
        // using "*template-assets" keys.
        // -------------------------------------------------------------------------------------------------------------

        $templateList = ['' => $templateDefinition] + $templateDefinition->getParentList();

        /** @var  TemplateDefinition $template */
        foreach (array_reverse($templateList) as $template) {
            // Add template directories  in the current template, in order to get assets
            $this->addTemplateDirectory(
                $templateDefinition->getType(),
                $template->getName(), // $templateDefinition->getName(), // We add the template definition in the main template directory
                $template->getAbsolutePath(),
                self::TEMPLATE_ASSETS_KEY, //$templateKey,
                true
            );
        }

        // -------------------------------------------------------------------------------------------------------------
        // Add template and its parent pathes to the Smarty template path list
        // using "*template-assets" keys.
        // -------------------------------------------------------------------------------------------------------------

        /**
         * @var string $keyPrefix
         * @var  TemplateDefinition $template
         */
        foreach ($templateList as $keyPrefix => $template) {
            $templateKey = $keyPrefix . self::TEMPLATE_ASSETS_KEY;

            // Add the template directory to the Smarty search path
            $this->addTemplateDir($template->getAbsolutePath(), $templateKey);

            // Also add the configuration directory
            $this->addConfigDir(
                $template->getAbsolutePath() . DS . 'configs',
                $templateKey
            );
        }

        // -------------------------------------------------------------------------------------------------------------
        // Add all modules template directories foreach of the template list to the Smarty search path.
        // -------------------------------------------------------------------------------------------------------------

        $type = $templateDefinition->getType();

        foreach ($templateList as $keyPrefix => $template) {
            if (isset($this->templateDirectories[$type][$template->getName()])) {
                foreach ($this->templateDirectories[$type][$template->getName()] as $key => $directory) {
                    if (null === $this->getTemplateDir($key)) {
                        $this->addTemplateDir($directory, $key);
                        $this->addConfigDir($directory . DS . 'configs', $key);
                    }
                }
            }
        }

        // -------------------------------------------------------------------------------------------------------------
        // Add the "default" modules template directories if we have to fallback to "default"
        // -------------------------------------------------------------------------------------------------------------

        if ($fallbackToDefaultTemplate) {
            if (isset($this->templateDirectories[$type]['default'])) {
                foreach ($this->templateDirectories[$type]['default'] as $key => $directory) {
                    if (null === $this->getTemplateDir($key)) {
                        $this->addTemplateDir($directory, $key);
                        $this->addConfigDir($directory . DS . 'configs', $key);
                    }
                }
            }
        }
    }
417367
public function requireDefaultRecords()
    {
        parent::requireDefaultRecords();

        // Only run on ErrorPage class directly, not subclasses
        if (static::class !== self::class || !SiteTree::config()->create_default_pages) {
            return;
        }

        $defaultPages = $this->getDefaultRecords();

        foreach ($defaultPages as $defaultData) {
            $this->requireDefaultRecordFixture($defaultData);
        }
    }