datatable.directory codebase
https://datatable.directory/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
499 B
28 lines
499 B
7 years ago
|
<?php
|
||
|
|
||
|
|
||
|
namespace App\View;
|
||
|
|
||
|
class WidgetFactory
|
||
|
{
|
||
|
public function text($name, $label)
|
||
|
{
|
||
|
return new Widget('input', $name, $label);
|
||
|
}
|
||
|
|
||
|
public function number($name, $label)
|
||
|
{
|
||
|
return new Widget('number', $name, $label);
|
||
|
}
|
||
|
|
||
|
public function email($name, $label)
|
||
|
{
|
||
|
return new Widget('email', $name, $label);
|
||
|
}
|
||
|
|
||
|
public function textarea($name, $label)
|
||
|
{
|
||
|
return (new Widget('textarea', $name, $label))->minHeight('4em');
|
||
|
}
|
||
|
}
|