@param string $name
@param string $value
@param string $description
@param string $type

@return $this
193341
public function setProperty($name, $value, $description, $type='textfield')
    {
        $property = new ElementProperty($name);
        $property
            ->setValue($value)
            ->setDescription($description)
            ->setType($type);

        $this->blendable_xpdo_simple_object_data['properties'][$name] = $property->toArray();
        return $this;
    }
662575
public function bindValue($param, $value, $type = \PDO::PARAM_STR)
    {
        $this->statement->bindValue($param, $value, $type);
        return $this;
    }
701481
public function invalidValue($name, $description)
	{
		$this->invalidData[$name] = true;
		$this->addMessage($name, $description);
	}
575306
public function input($type = null, $name = null, $value = null)
    {
        $hasValue = $name && (! is_null($this->old($name, $value)) || ! is_null($value));

        return Input::create()
            ->attributeIf($type, 'type', $type)
            ->attributeIf($name, 'name', $this->fieldName($name))
            ->attributeIf($name, 'id', $this->fieldName($name))
            ->attributeIf($hasValue, 'value', $this->old($name, $value));
    }
132467
protected function createToken($type, $name, $value)
    {
        return $this->getPrototype(
                $this->tokenClass,
                ['umi\syntax\token\IToken']
            )
            ->createInstance([$type, $name, $value]);
    }
1332272
public function addDefinition($type, $value, $field)
	{
		$definition = new \stdClass();
		$definition->type = $type;
		$definition->value = $value;
		$definition->field = $field;
		
		$this->_filter[] = $definition;
	}
959387
public function addModule($name, array $description)
    {
        if (!isset($this->descriptor['modules'])) {
            $this->descriptor['modules'] = [];
        }
        $this->descriptor['modules'][$name] = $description;

        return $this;
    }
521483
public function addChoice($value, $description)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->choices[] = array(
                "key" => $value,
                "value" => Splash::trans(trim($description))
            );
        }

        return $this;
    }
460310
public function asTextArea($name, $value, $type, $column, $class = '')
    {
        $input = $this->textarea($name, $value, [
            'id' => 'mention-' . $name,
            'class' => $class
        ]);

$scriptTag = <<< EOT
    <script type="text/javascript">
        $(function(){
            enableMentions("#mention-$name", "$type", "$column");
        });
    </script>
EOT;

        return $scriptTag.$input;
    }
56393
private function addMetric(string $name, string $type, array $value){
        $this->metrics[$name]   = [
            "name"  => $name,
            "type"  => $type,
            "value" => $value,
        ];
    }
65563
public function input($type, $name, $value = null)
    {
        $value = $this->inputs ? $this->inputs->get($name, $value) : $value;
        $form  = (new Input($type, $name))->value($value);
        return $this->setClass($form);
    }
529983
public function actionSet ($name, $value, $description = null)
		{
			$class = $this->_modelClass;
			$object = $class::find()->where([ 'name' => $name ])->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}
			else
			{
				$object->value = $value;
				if (!is_null($description))
					$object->description = $description;
			}
			$object->save();
			$this->actionList();
		}
87705
public static function create($value, $type = self::TYPE_PLAIN_TEXT): self
    {
        $text = new self();

        $text->text = $value;
        $text->type = $type;

        return $text;
    }
459528
protected function form($type, $name = null, $value = null) {
		
		$form = new Form();
		return $form -> {$type}($name, $value);
	}
930117
protected function createInput($type, $name = null, $value = null, $attr = null)
    {
        if($type == 'textarea')
            $input = new Input\Textarea($name);
        else
            $input = new Input\Input($type, $name);

        if($name)
            $input->attr('id', $name);

        if($value)
            $input->value($value);
        else if(isset($this->data[$name]))
            $input->value($this->data[$name]);

        if($attr)
            $input->attr($attr);

        if(isset($this->override[$name]))
            $input->override($this->override[$name]);

        return $input;
    }
125228
protected function _set($name, $definition, $type)
    {
        if ($definition instanceof Closure) {
            $definition = $definition->bindTo($this, get_class($this));
        }
        $this->_definitions[$name] = compact('definition', 'type');
    }
195766
public function field(string $key, $value = null, $description = null)
    {
        if ( ! $field = $this->fields->where('key', $key)->first()) {
            $this->fields->push(
                $field = $this->fields()->firstOrNew(compact('key'))
            );
        }

        $field->setDefaultValue($value);
        $field->setDefaultDescription($description);

        $field->save();

        return $field;
    }