Final Class Yiisoft\Yii\DataView\GridView\Column\ActionColumn
| Inheritance | Yiisoft\Yii\DataView\GridView\Column\ActionColumn |
|---|---|
| Implements | Yiisoft\Yii\DataView\GridView\Column\ColumnInterface |
ActionColumn is a column for the {@see GridView} widget that displays buttons for viewing and manipulating
the items.
Psalm Types
| Name | Value |
|---|---|
| UrlCreator | callable |
| ButtonRenderer | Yiisoft\Yii\DataView\GridView\Column\ActionButton|callable |
| TContent | scalar|\Stringable|null|callable |
Public Properties
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\DataView\GridView\Column\ActionColumn | |
| getRenderer() | Yiisoft\Yii\DataView\GridView\Column\ActionColumn | |
| getUrlCreator() | Get the URL creator callback. | Yiisoft\Yii\DataView\GridView\Column\ActionColumn |
| isVisible() | Yiisoft\Yii\DataView\GridView\Column\ActionColumn |
Property Details
Method Details
| public mixed __construct ( string|null $template = null, string|null $before = null, string|null $after = null, mixed $urlConfig = null, callable|null $urlCreator = null, string|null $header = null, string|null $footer = null, mixed $content = null, array|null $buttons = null, array|null $visibleButtons = null, array $columnAttributes = [], array $headerAttributes = [], array $bodyAttributes = [], array $footerAttributes = [], boolean $visible = true ) | ||
| $template | string|null |
The template used for composing each cell in the action column. |
| $before | string|null |
Content to be prepended to the action column content. |
| $after | string|null |
Content to be appended to the action column content. |
| $urlConfig | mixed |
URL configuration for generating button URLs. |
| $urlCreator | callable|null |
A callback that creates a button URL using the specified data information. |
| $header | string|null |
The header cell content. |
| $footer | string|null |
The footer cell content. |
| $content | mixed |
The content to be rendered in each data cell. |
| $buttons | array|null |
Array of buttons. Keys are button names. Values are either instances
of {@see \Yiisoft\Yii\DataView\GridView\Column\ActionButton} or a callable with the following signature: |
| $visibleButtons | array|null |
Array of button visibility rules. |
| $columnAttributes | array |
HTML attributes for the column cells. |
| $headerAttributes | array |
HTML attributes for the header cell. |
| $bodyAttributes | array |
HTML attributes for the body cells. |
| $footerAttributes | array |
HTML attributes for the footer cell. |
| $visible | boolean |
Whether the column is visible. |
public function __construct(
public readonly ?string $template = null,
public readonly ?string $before = null,
public readonly ?string $after = null,
public readonly mixed $urlConfig = null,
?callable $urlCreator = null,
public readonly ?string $header = null,
public readonly ?string $footer = null,
public readonly mixed $content = null,
public readonly ?array $buttons = null,
public readonly ?array $visibleButtons = null,
public readonly array $columnAttributes = [],
public readonly array $headerAttributes = [],
public readonly array $bodyAttributes = [],
public readonly array $footerAttributes = [],
private readonly bool $visible = true,
) {
$this->urlCreator = $urlCreator;
}
| public string getRenderer ( ) |
public function getRenderer(): string
{
return ActionColumnRenderer::class;
}
Get the URL creator callback.
| public callable|null getUrlCreator ( ) | ||
| return | callable|null |
The URL creator callback. |
|---|---|---|
public function getUrlCreator(): ?callable
{
return $this->urlCreator;
}
Signup or Login in order to comment.