Class Yiisoft\Form\PureField\Field
| Inheritance | Yiisoft\Form\PureField\Field |
|---|
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| DEFAULT_THEME | null | Yiisoft\Form\PureField\Field |
Method Details
| public static Yiisoft\Form\Field\Checkbox checkbox ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function checkbox(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Checkbox {
return Checkbox::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\CheckboxList checkboxList ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function checkboxList(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): CheckboxList {
return CheckboxList::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Color color ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function color(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Color {
return Color::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Date date ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function date(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Date {
return Date::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\DateTimeLocal dateTimeLocal ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function dateTimeLocal(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): DateTimeLocal {
return DateTimeLocal::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Email email ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function email(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Email {
return Email::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Part\Error error ( string|null $message = null, array $config = [], string|null $theme = null ) | ||
| $message | string|null | |
| $config | array | |
| $theme | string|null | |
final public static function error(?string $message = null, array $config = [], ?string $theme = null): Error
{
return Error::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)->message($message);
}
| public static Yiisoft\Form\Field\ErrorSummary errorSummary ( array $errors = [], array $config = [], string|null $theme = null ) | ||
| $errors | array | |
| $config | array | |
| $theme | string|null | |
final public static function errorSummary(
array $errors = [],
array $config = [],
?string $theme = null,
): ErrorSummary {
return ErrorSummary::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)->errors($errors);
}
| public static Yiisoft\Form\Field\Fieldset fieldset ( array $config = [], string|null $theme = null ) | ||
| $config | array | |
| $theme | string|null | |
final public static function fieldset(array $config = [], ?string $theme = null): Fieldset
{
return Fieldset::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME);
}
| public static Yiisoft\Form\Field\File file ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function file(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): File {
return File::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Part\Hint hint ( string|null $content = null, array $config = [], string|null $theme = null ) | ||
| $content | string|null | |
| $config | array | |
| $theme | string|null | |
final public static function hint(?string $content = null, array $config = [], ?string $theme = null): Hint
{
return Hint::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)->content($content);
}
| public static Yiisoft\Form\Field\Image image ( string|null $url = null, array $config = [], string|null $theme = null ) | ||
| $url | string|null | |
| $config | array | |
| $theme | string|null | |
final public static function image(?string $url = null, array $config = [], ?string $theme = null): Image
{
$field = Image::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME);
if ($url !== null) {
$field = $field->src($url);
}
return $field;
}
| public static Yiisoft\Form\Field\Part\Label label ( string|null $content = null, array $config = [], string|null $theme = null ) | ||
| $content | string|null | |
| $config | array | |
| $theme | string|null | |
final public static function label(?string $content = null, array $config = [], ?string $theme = null): Label
{
return Label::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)->content($content);
}
| public static Yiisoft\Form\Field\Number number ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function number(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Number {
return Number::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Password password ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function password(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Password {
return Password::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\RadioList radioList ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function radioList(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): RadioList {
return RadioList::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Range range ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function range(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Range {
return Range::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\ResetButton resetButton ( string|null $content = null, array $config = [], string|null $theme = null ) | ||
| $content | string|null | |
| $config | array | |
| $theme | string|null | |
final public static function resetButton(
?string $content = null,
array $config = [],
?string $theme = null,
): ResetButton {
$field = ResetButton::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME);
if ($content !== null) {
$field = $field->content($content);
}
return $field;
}
| public static Yiisoft\Form\Field\Select select ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function select(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Select {
return Select::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\SubmitButton submitButton ( string|null $content = null, array $config = [], string|null $theme = null ) | ||
| $content | string|null | |
| $config | array | |
| $theme | string|null | |
final public static function submitButton(
?string $content = null,
array $config = [],
?string $theme = null,
): SubmitButton {
$field = SubmitButton::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME);
if ($content !== null) {
$field = $field->content($content);
}
return $field;
}
| public static Yiisoft\Form\Field\Telephone telephone ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function telephone(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Telephone {
return Telephone::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Text text ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function text(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Text {
return Text::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Textarea textarea ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function textarea(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Textarea {
return Textarea::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Time time ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function time(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Time {
return Time::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
| public static Yiisoft\Form\Field\Url url ( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ) | ||
| $name | string|null | |
| $value | mixed | |
| $config | array | |
| $theme | string|null | |
final public static function url(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Url {
return Url::widget(config: $config, theme: $theme ?? static::DEFAULT_THEME)
->inputData(new InputData($name, $value));
}
Signup or Login in order to comment.