Replaces the CSS styles for selected part.
@param integer $what number of part
@param array $value list of styles
500210
protected function replaceStyle($what, $value)
    {
        if (is_array($value) && count($value)) {
            $type = 'inner';
            switch ($what) {
                case 0:
                    $type = 'outer';
                    break;
                case 2:
                    $type = 'button';
                    break;
            }
            foreach ($value as $name => $set) {
                if (isset($this->{$type . 'Style'}[$name])) {
                    if ($set === false || $set === null) {
                        unset($this->{$type . 'Style'}[$name]);
                    } else {
                        $this->{$type . 'Style'}[$name] = str_replace(';', '', trim($set));
                    }
                }
            }
        }
    }
1321965
public function setCaption($value) {
		if (JString::startswith($value, "-")) {
			$this->class="dropdown-header";
			$this->role="presentation";
			$this->_template='<li id="%identifier%" class="%class%" role="%role%">%content%</li>';
			if ($value==="-") {
				$this->class="divider";
			}
			$value=substr($value, 1);
		}
		$this->content=$value;
		return $this;
	}
310485
public function setSelectedByValue($value)
    {
        $x = 0;
        foreach ($this->options as $idx => $data) {
            if ($value == $data) {
                $this->setSelectedIndex($x);

                return;
            }
            $x++;
        }

        $this->setSelectedIndex(-1);
    }
163929
public function setStyle($style,$value) {
    if ($this->morphed) {
      throw new Exception('setStyle() vor dem morphen aufrufen!');
    }
    $this->styles[$style] = $value;
    return $this;
  }
281775
public function setStyleValue($key, $value) {
		if($key == '_borderSize') {
			$this->setBorderSize($value);
		} elseif($key == '_borderColor') {
			$this->setBorderColor($value);
		} else {
			$this->$key = $value;
		}
	}
1280722
protected function setHtmlOptions($what, $value)
    {
        if (is_array($value) && count($value)) {
            $type = 'inner';
            switch ($what) {
                case 0:
                    $type = 'outer';
                    break;
                case 2:
                    $type = 'button';
                    break;
            }
            foreach ($value as $name => $set) {
                if ($name == 'class' || $name == 'style') {
                    continue;
                } else {
                    $this->{$type . 'Html'}[$name] = trim($set);
                }
            }
        }
    }
12379
protected function processValue(&$value) {
    if (!is_array($value)) {
      // decode encoded (%##) values
      if (preg_match ("/%/", $value)) {
        $value = urldecode($value);
      }
      // make arrays
      if(preg_match("/^{.*}$/", $value)) {
        $arrayValues = StringUtil::quotesplit(substr($value, 1, -1));
        $value = [];
        foreach ($arrayValues as $arrayValue) {
          $value[] = trim($arrayValue);
        }
      }
    }
  }
357283
public function setRaw($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $innerName => $innerValue) {
                $this->replace($innerName, $innerValue);
            }
        } else {
            $this->replace($name, $value);
        }

        // return is for chaining
        return $this;
    }
163460
public function removePersonImageVersion($value)
    {
        $targetArray = array();
        foreach ($this->getPersonImageVersions() as $element) {
            if ($element != $value) {
                $targetArray []= $element;
            }
        }
        $this->setPersonImageVersions($targetArray);

        return $this;
    }
539735
function setValue($value)
    {
        $this->_createElementsIfNotExist();
        foreach (array_keys($this->_elements) as $key) {
            if (!$this->_appendName) {
                $v = $this->_elements[$key]->_findValue($value);
                if (null !== $v) {
                    $this->_elements[$key]->onQuickFormEvent('setGroupValue', $v, $this);
                }

            } else {
                $elementName = $this->_elements[$key]->getName();
                $index       = strlen($elementName) ? $elementName : $key;
                if (is_array($value)) {
                    if (isset($value[$index])) {
                        $this->_elements[$key]->onQuickFormEvent('setGroupValue', $value[$index], $this);
                    }
                } elseif (isset($value)) {
                    $this->_elements[$key]->onQuickFormEvent('setGroupValue', $value, $this);
                }
            }
        }
    }
152407
public function changeValue($value)
    {

        parent::changeValue($value);

        if ($value !== null) {
            $this->filename = basename($value);
            $this->fullFilename = $value;
            $this->path = dirname($this->fullFilename) . DIRECTORY_SEPARATOR;
        }

    }
650899
public function setAceCodeHighlighting($value, $dc)
	{
		$pattern = $GLOBALS['TL_DCA']['tl_content']['fields'][$dc->field]['pattern'];
		$highlight = $GLOBALS['TL_DCA']['tl_content']['fields'][$pattern . '-highlight']['data'];

		if (!empty($highlight))
		{
			$GLOBALS['TL_DCA']['tl_content']['fields'][$dc->field]['eval']['rte'] = 'ace|' . strtolower($highlight);
		}

		return $value;
	}
1142616
protected function _set_args($what, $alias, $value)
    {
        // save value in args
        if ($alias === null) {
            $this->args[$what][] = $value;
        } else {

            // don't allow multiple values with same alias
            if (isset($this->args[$what][$alias])) {
                throw new Exception([
                    ucfirst($what).' alias should be unique',
                    'alias' => $alias,
                ]);
            }

            $this->args[$what][$alias] = $value;
        }
    }
295195
function column_style($column, $property, $value) {
        if (isset($this->column_style[$column])) {
            $this->column_style[$column][$property] = $value;
        }
    }
1109704
private function set($part, $value)
    {
        if (null === $value && isset(self::$defaults[$part])) {
            $value = self::$defaults[$part];
        }
        $this->parts[$part] = $value;
        return $this;
    }
153959
protected function processListItemValue($value, $args = [])
    {
        return ViewTools::singleton()->processAttribute($value, $this->owner, $this->owner->getRenderer(), $args);
    }
1160318
public function set_source($value){
		if (is_string($value))
			$value = trim($value);
		$this->source = $value;
	}