0 follower

Final Class Yiisoft\Yii\DataView\GridView\Column\ActionButton

InheritanceYiisoft\Yii\DataView\GridView\Column\ActionButton

ActionButton represents a button in an action column of a grid.

Property Details

Hide inherited properties

$attributes public property
public Closure|array|null $attributes null
$class public property
$content public property
public Closure|string|\Stringable $content ''
$overrideAttributes public property
$title public property
public string|null $title null
$url public property
public Closure|string|null $url null

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( Closure|string|\Stringable $content '', Closure|string|null $url null, array|Closure|null $attributes null, array|Closure|false|string|null $class false, string|null $title null, boolean $overrideAttributes false )
$content Closure|string|\Stringable

Button content. If closure is used, its signature is: function(array|object $data, DataContext $context): string|Stringable.

$url Closure|string|null

Button URL. If closure is used, its signature is: function(array|object $data, DataContext $context): string.

$attributes array|Closure|null

HTML attributes. If closure is used, its signature is: function(array|object $data, DataContext $context): array.

$class array|Closure|false|string|null

CSS class(es). If closure is used, its signature is: function(array|object $data, DataContext $context): string|array<array-key,string|null>|null.

$title string|null

Button title attribute.

$overrideAttributes boolean

Whether to override default attributes with custom ones instead of merging.

                public function __construct(
    public readonly Closure|string|Stringable $content = '',
    public readonly Closure|string|null $url = null,
    public readonly Closure|array|null $attributes = null,
    public readonly Closure|string|array|false|null $class = false,
    public readonly ?string $title = null,
    public readonly bool $overrideAttributes = false,
) {}