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 checkbox( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Checkbox | ||
| $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 checkboxList( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\CheckboxList | ||
| $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 color( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Color | ||
| $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 date( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Date | ||
| $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 dateTimeLocal( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\DateTimeLocal | ||
| $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 email( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Email | ||
| $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 error( string|null $message = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Part\Error | ||
| $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 errorSummary( array $errors = [], array $config = [], string|null $theme = null ): Yiisoft\Form\Field\ErrorSummary | ||
| $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 fieldset( array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Fieldset | ||
| $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 file( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\File | ||
| $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 hint( string|null $content = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Part\Hint | ||
| $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 image( string|null $url = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Image | ||
| $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 label( string|null $content = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Part\Label | ||
| $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 number( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Number | ||
| $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 password( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Password | ||
| $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 radioList( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\RadioList | ||
| $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 range( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Range | ||
| $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 resetButton( string|null $content = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\ResetButton | ||
| $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 select( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Select | ||
| $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 submitButton( string|null $content = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\SubmitButton | ||
| $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 telephone( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Telephone | ||
| $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 text( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Text | ||
| $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 textarea( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Textarea | ||
| $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 time( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Time | ||
| $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 url( string|null $name = null, mixed $value = null, array $config = [], string|null $theme = null ): Yiisoft\Form\Field\Url | ||
| $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.