Class Yiisoft\Form\PureField\FieldFactory
| Inheritance | Yiisoft\ |
|---|
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $defaultTheme | ?string | Yiisoft\ |
Public Methods
Property Details
Method Details
| public mixed __construct ( ?string $defaultTheme = null ) | ||
| $defaultTheme | ?string | |
final public function __construct(
protected readonly ?string $defaultTheme = null,
) {}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function checkbox(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Checkbox {
return Checkbox::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function checkboxList(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): CheckboxList {
return CheckboxList::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function color(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Color {
return Color::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function date(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Date {
return Date::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function dateTimeLocal(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): DateTimeLocal {
return DateTimeLocal::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function email(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Email {
return Email::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $message | ?string | |
| $config | array | |
| $theme | ?string | |
final public function error(?string $message = null, array $config = [], ?string $theme = null): Error
{
return Error::widget(config: $config, theme: $theme ?? $this->defaultTheme)->message($message);
}
| public Yiisoft\ | ||
| $errors | array | |
| $config | array | |
| $theme | ?string | |
final public function errorSummary(
array $errors = [],
array $config = [],
?string $theme = null,
): ErrorSummary {
return ErrorSummary::widget(config: $config, theme: $theme ?? $this->defaultTheme)->errors($errors);
}
| public Yiisoft\ | ||
| $config | array | |
| $theme | ?string | |
final public function fieldset(array $config = [], ?string $theme = null): Fieldset
{
return Fieldset::widget(config: $config, theme: $theme ?? $this->defaultTheme);
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function file(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): File {
return File::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $content | ?string | |
| $config | array | |
| $theme | ?string | |
final public function hint(?string $content = null, array $config = [], ?string $theme = null): Hint
{
return Hint::widget(config: $config, theme: $theme ?? $this->defaultTheme)->content($content);
}
| public Yiisoft\ | ||
| $url | ?string | |
| $config | array | |
| $theme | ?string | |
final public function image(?string $url = null, array $config = [], ?string $theme = null): Image
{
$field = Image::widget(config: $config, theme: $theme ?? $this->defaultTheme);
if ($url !== null) {
$field = $field->src($url);
}
return $field;
}
| public Yiisoft\ | ||
| $content | ?string | |
| $config | array | |
| $theme | ?string | |
final public function label(?string $content = null, array $config = [], ?string $theme = null): Label
{
return Label::widget(config: $config, theme: $theme ?? $this->defaultTheme)->content($content);
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function number(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Number {
return Number::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function password(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Password {
return Password::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function radioList(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): RadioList {
return RadioList::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function range(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Range {
return Range::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $content | ?string | |
| $config | array | |
| $theme | ?string | |
final public function resetButton(
?string $content = null,
array $config = [],
?string $theme = null,
): ResetButton {
$field = ResetButton::widget(config: $config, theme: $theme ?? $this->defaultTheme);
if ($content !== null) {
$field = $field->content($content);
}
return $field;
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function select(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Select {
return Select::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $content | ?string | |
| $config | array | |
| $theme | ?string | |
final public function submitButton(
?string $content = null,
array $config = [],
?string $theme = null,
): SubmitButton {
$field = SubmitButton::widget(config: $config, theme: $theme ?? $this->defaultTheme);
if ($content !== null) {
$field = $field->content($content);
}
return $field;
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function telephone(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Telephone {
return Telephone::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function text(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Text {
return Text::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function textarea(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Textarea {
return Textarea::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function time(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Time {
return Time::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
| public Yiisoft\ | ||
| $name | ?string | |
| $value | mixed | |
| $config | array | |
| $theme | ?string | |
final public function url(
?string $name = null,
mixed $value = null,
array $config = [],
?string $theme = null,
): Url {
return Url::widget(config: $config, theme: $theme ?? $this->defaultTheme)
->inputData(new InputData($name, $value));
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.