| Methods |
protected
|
init(): void
|
#
|
public
|
addButton(
string|array|View $button,
JsExpressionable|JsCallbackSetClosure|ExecutorInterface $action = null,
string $confirmMsg = '',
bool|(Closure(Model): bool) $isDisabled = false,
): View
Adds a new button which will execute $callback when clicked.
Adds a new button which will execute $callback when clicked.
|
#
|
public
|
addModal(
string|array|View $button,
string|array $defaults,
Closure(View, string|null): void $callback,
View $owner = null,
array $args = [],
): View
Adds a new button which will open a modal dialog and dynamically
load contents through $callback. Will pass a virtual…
Adds a new button which will open a modal dialog and dynamically
load contents through $callback. Will pass a virtual page.
Parameters
| $defaults |
modal title or modal defaults array
|
|
#
|
public
|
getTag(string $position, $value, $attr = []): string
Returns a suitable cell tag with the supplied value. Applies modifiers
added through addClass and setAttr.
Returns a suitable cell tag with the supplied value. Applies modifiers
added through addClass and setAttr.
Parameters
| $position |
'head', 'body' or 'tail'
|
| $value |
either HTML or array defining HTML structure, see App::getTag help
|
| $attr |
extra attributes to apply on the tag
|
Overrides
|
#
|
public
|
getDataCellTemplate(Field $field = null): string
Provided with a field definition will return a string containing a "Template"
that would produce CONTENTS OF <td> cell…
Provided with a field definition will return a string containing a "Template"
that would produce CONTENTS OF cell when rendered. Example output:.
{$name}
The tag that corresponds to the name of the field (e.g. {$name}) may be substituted
by another template returned by getDataCellTemplate when multiple formatters are
applied to the same column. The first one to be applied is executed first, then
a subsequent ones are executed.
Overrides
|
#
|
|
public
|
getHtmlTags(Model $row, ?Field $field): array
Return associative array of tags to be filled with pre-rendered HTML on
a column-basis. Will not be invoked if HTML…
Return associative array of tags to be filled with pre-rendered HTML on
a column-basis. Will not be invoked if HTML output is turned off for the table.
Overrides
|
#
|