abstract class TwillFormComponent extends Component (View source)

The constructor of our components does grow quite large, but the benefit of this is that it is clear what is in, needs to be in, and it provides autocomplete on modern code editors.

Properties

Model|null $item
array $form_fields
string|null $formModuleName
string|null $routePrefix

Methods

__construct(string $name, string $label, string|null $note = '', bool $inModal = false, bool $readOnly = false, bool $renderForBlocks = false, bool $renderForModal = false, bool $disabled = false, bool $required = false, bool $translated = false, mixed $default = null)

No description

string
formFieldName(bool $asAttributes = false, string|null $customName = null)

No description

View
render()

No description

Details

__construct(string $name, string $label, string|null $note = '', bool $inModal = false, bool $readOnly = false, bool $renderForBlocks = false, bool $renderForModal = false, bool $disabled = false, bool $required = false, bool $translated = false, mixed $default = null)

No description

Parameters

string $name
string $label
string|null $note
bool $inModal
bool $readOnly
bool $renderForBlocks
bool $renderForModal
bool $disabled
bool $required
bool $translated
mixed $default

string formFieldName(bool $asAttributes = false, string|null $customName = null)

No description

Parameters

bool $asAttributes
string|null $customName

Return Value

string

abstract View render()

No description

Return Value

View