applies modifiers to FormElement::$value
FormElement::$value remains unchanged

@param string $value
@return string modified value
768656
protected function applyModifiers($value) {

		foreach($this->modifiers as $modifier) {
			
			if($modifier instanceof \Closure) {
				$value = $modifier($value);
			}

			else {
				switch(strtolower($modifier)) {
					case 'trim':
                        $value = trim($value);
						break;

					case 'uppercase':
                        $value = strtoupper($value);
						break;
	
					case 'lowercase':
                        $value = strtolower($value);
						break;
	
					case 'strip_tags':
                        $value = strip_tags($value);
						break;
	
						// assume a regular expressions as fallback
					default:
                        $value = preg_replace($modifier, '', $value);
				}
			}
		}

		return $value;

	}
1222663
public function compile($value = "")
	{
		$html = $this->compiledLabel;

		if (!empty($this->help)) {
			$html .= "<div class='help'>{$this->help}</div>";
		}

		$html .= "<input type=\"{$this->type}\" name=\"{$this->name}\" {$this->compiledAttr} value=\"{$value}\" />";

		return $html;
	}
784018
protected function replacementL($value, array $modifiers)
    {
        if (!is_array($value)) {
            throw new DataInvalidFormat('list', 'required array (list of values)');
        }
        $values = array();
        foreach ($value as $k => $element) {
            if (is_array($element)) {
                throw new DataInvalidFormat('list', 'required scalar in item #'.$k);
            }
            $values[] = $this->valueModification($element, $modifiers);
        }
        return implode(', ', $values);
    }
1204354
public function prepareValue($value)
    {
        if ($this->hasMutator()) {
            $value = call_user_func($this->mutator, $value);
        }

        return $value;
    }
1020798
public function compileMinify($value)
    {
        if ($this->ignoredPaths) {
            $path = str_replace('\\', '/', $this->getPath());

            foreach ($this->ignoredPaths as $ignoredPath) {
                if (strpos($path, $ignoredPath) !== false) {
                    return $value;
                }
            }
        }

        return $this->blade->render($value);
    }
1113004
public function render($value)
    {
        if ($this->shouldMinify($value)) {
            $replace = [
                '/<!--[^\[](.*?)[^\]]-->/s' => '',
                "/<\?php/"                  => '<?php ',
                "/\n([\S])/"                => ' $1',
                "/\r/"                      => '',
                "/\n/"                      => '',
                "/\t/"                      => ' ',
                '/ +/'                      => ' ',
            ];

            $value = preg_replace(array_keys($replace), array_values($replace), $value);
        } else {
            // Where skip minification tags are used let's remove them from markdown or blade.
            $value = preg_replace("/<!--[\s]+skip\.minification[\s]+-->/", '', $value);
        }

        return $value;
    }
387649
private function generateFormElements($value)
    {
        $form = $label = '';
        $label = Inflector::underscoreToSpace($value['COLUMN_NAME']);
        $form .= "\t\t".'->addElement("label", "'.$label.'", ["class" => "col-sm-2 control-label","style" => "width:100%;"])'.PHP_EOL;

        $form .= "\t\t".'->addElement("text", "'.$value['COLUMN_NAME'].'", ["value" => (isset($this->model->'.$value['COLUMN_NAME'].')) ? $this->model->'.$value['COLUMN_NAME'].' : "", "class" => "form-control"])'.PHP_EOL;

        return $form;
    }
1211590
public function value($value = null)
    {
        $fieldType = $this->getType();
        if ($value !== null) {
            switch ($fieldType) {
                case self::TYPE_FIELD_TEXT:
                case self::TYPE_FIELD_FILE:
                case self::TYPE_FIELD_TEXT_AREA:
                    if ($fieldType != self::TYPE_FIELD_FILE) {
                        $this->clear();
                    }
                    $params = ['value' => ["{$value}"]];
                    $this->sendCommand('element/:id/value', WebDriver_Command::METHOD_POST, $params);
                    break;
                case self::TYPE_FIELD_SELECT:
                    $this->waitPresent()->child(sprintf("xpath=descendant::option[@value='%s']", $value))
                        ->waitPresent()
                        ->click();
                    break;
            }
            return $this;
        } else {
            $value = null;
            switch ($fieldType) {
                case self::TYPE_FIELD_TEXT:
                case self::TYPE_FIELD_FILE:
                case self::TYPE_FIELD_TEXT_AREA:
                case self::TYPE_FIELD_SELECT:
                    $value = $this->attribute('value');
                    break;
                default:
                    $value = $this->text();
                    if ($this->webDriver->config()->get(WebDriver_Config::TRIM_TEXT_NODE_VALUE)) {
                        $value = trim($value);
                    }
            }
            return $value;
        }
    }
262732
public function formatDetailed($value)
    {
        //\MUtil_Echo::track($value);
        if (is_array($value)) {
            $group = $this->currentUser->getGroup();

            if ($group) {
                $value = $group->applyGroupToData($value);
            }
        }

        return parent::formatDetailed($value);
    }
620328
public function setValue($value)
    {
        if (!is_string($value) || (is_object($value) && !method_exists($value, "__toString"))) {
            throw new InvalidArgumentException(sprintf(
                "Invalid argument given to %s, expected a string, %s given",
                __METHOD__,
                is_object($value) ? get_class($value) : gettype($value)
            ));
        }

        $value = (string) $value;

        if (null !== $regex = $this->getValidationRegex()) {
            if (! preg_match($regex, $value)) {
                throw new InvalidArgumentException(sprintf(
                    "The given value '%s' doesn't match the validation regular expression: %s",
                    $value,
                    $regex
                ));
            }
        }

        $this->value = $value;

        return $this;
    }
664821
protected function compile_extensions($value) {

        foreach ($this->extensions as &$compiler) {
            $value = call_user_func($compiler, $value);
        }

        return $value;
    }
1239422
protected function formatValue($value)
    {
        // If the value is a date we'll format it according to the specified
        // date format.
        if ($value instanceof DateTime || $value instanceof Carbon)
        {
            $value = $value->format($this->grammar->getDateFormat());
        }

        return $value;
    }
331723
protected function formatValue($value)
    {
        if ($this->formatValue !== NULL) {
            return str_replace(static::VALUE_IDENTIFIER, $value, $this->formatValue);
        } else {
            return $value;
        }
    }
871467
public function setValue($value)
	{
		$failure = true;
		switch($this->opration)
		{
			case '==':
				if($value==$this->condition)
					$failure = false;
				break;
			case '>':
				if($value>$this->condition)
					$failure = false;
				break;
			case '>=':
				if($value>=$this->condition)
					$faulure = false;
				break;
			case '<':
				if($value<$this->condition)
					$failure = false;
				break;
			case '<=':
				if($value<=$this->condition)
					$failure = false;
				break;
			case '*':
				if(strpos($value, $this->condition)!==false)
					$failure = false;
				break;
			case '^':
				if(strpos($value, $this->condition)===0)
					$failure = false;
				break;
			case '$':
				if(strrpos($value, $this->condition)==strlen($value)-strlen($this->condition))
					$failure = false;
				break;
			default:
				break;
		}
		if($failure)
			throw $this->getContext()->getModel('ValidationException', 'Form', array(
				array(
					'' => 'condition failed'
				)
			));
		return $value;
	}
1100501
protected function _compile_extensions($value)
    {
        foreach ($this->_extensions as $compiler) {
            $value = call_user_func($compiler, $value);
        }

        return $value;
    }
533372
public function setValue(ITypifiedElement $typified_element, $value)
	{
		if ( $typified_element instanceof ISimpleSetter ) {
			$typified_element->setValue($value);

			return $this;
		}

		throw new FormException(
			'Element ' . (string)$typified_element . ' doesn\'t support value changing',
			FormException::TYPE_READONLY_FIELD
		);
	}
86101
public function setValue($value)
    {
        parent::setValue($value);
        $this->setChecked($this->form->getFieldValue($this->name) == $this->getValue());
        return $this;
    }