Collective\Html\FormBuilder::getValueAttribute PHP Метод

getValueAttribute() публичный Метод

Get the value that should be assigned to the field.
public getValueAttribute ( string $name, string $value = null ) : mixed
$name string
$value string
Результат mixed
    public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) {
            return $value;
        }
        if (!is_null($this->old($name)) && $name != '_method') {
            return $this->old($name);
        }
        if (!is_null($value)) {
            return $value;
        }
        if (isset($this->model)) {
            return $this->getModelValueAttribute($name);
        }
    }

Usage Example

Пример #1
0
 /**
  * Get the value that should be assigned to the field.
  *
  * @param string $name
  * @param string $value
  * @return mixed 
  * @static 
  */
 public static function getValueAttribute($name, $value = null)
 {
     return \Collective\Html\FormBuilder::getValueAttribute($name, $value);
 }