Devise\Templates\TemplatesManager::updateTemplate PHP Method

updateTemplate() public method

Validates and updates a template with the given input
public updateTemplate ( array $input ) : boolean
$input array
return boolean
    public function updateTemplate($input)
    {
        if ($this->validateInputVars($input)) {
            $configContents = $this->ConfigFileManager->getAppOnly('devise.templates');
            // if newVars exist, validate and add to vars array
            if (isset($input['template']['newVars'])) {
                $this->processAndMergeNewVars($input['template']);
            }
            // overwrite input template vars with processed input vars data
            if (isset($input['template']['vars'])) {
                $input['template']['vars'] = $this->prepVarsAndParams($input['template']['vars']);
            }
            // overwrite template data for submitted template path/key
            $configContents[$input['template_path']] = $input['template'];
            return $this->ConfigFileManager->saveToFile($configContents, 'templates');
        }
        return false;
    }