PHP Класс Grido\Components\Actions\Action

Автор: Petr Bugyík
Наследование: extends Grido\Components\Component
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$customRender for custom rendering
$disable for disabling
$elementPrototype html tag
$options string
$primaryKey - name of primary key f.e.: link->('Article:edit', array($primaryKey => 1))

Открытые методы

Метод Описание
__construct ( Grid $grid, string $name, string $label )
getElement ( mixed $row ) : Nette\Utils\Html
getElementPrototype ( ) : Nette\Utils\Html Returns element prototype ( html tag).
getOption ( string $key, mixed $default = NULL ) : mixed Returns user-specific option.
getOptions ( ) : array Returns user-specific options.
getPrimaryKey ( ) : string
render ( mixed $row ) : void
setConfirm ( string | callback $confirm ) : Action Sets client side confirm.
setCustomRender ( $callback ) : Action Sets callback for custom rendering.
setDisable ( $callback ) : Action Sets callback for disable.
setElementPrototype ( Nette\Utils\Html $elementPrototype ) : Action Sets html element.
setIcon ( string $name ) : Action Sets name of icon.
setOption ( string $key, mixed $value ) : Action Sets user-specific option.
setPrimaryKey ( string $primaryKey ) : Action Sets primary key.

Описание методов

__construct() публичный Метод

public __construct ( Grid $grid, string $name, string $label )
$grid Grido\Grid
$name string
$label string

getElement() публичный Метод

public getElement ( mixed $row ) : Nette\Utils\Html
$row mixed
Результат Nette\Utils\Html
Returns user-specific option.
public getOption ( string $key, mixed $default = NULL ) : mixed
$key string
$default mixed
Результат mixed

getOptions() публичный Метод

Returns user-specific options.
public getOptions ( ) : array
Результат array

getPrimaryKey() публичный Метод

public getPrimaryKey ( ) : string
Результат string

render() публичный Метод

public render ( mixed $row ) : void
$row mixed
Результат void

setConfirm() публичный Метод

Sets client side confirm.
public setConfirm ( string | callback $confirm ) : Action
$confirm string | callback
Результат Action

setCustomRender() публичный Метод

Sets callback for custom rendering.
public setCustomRender ( $callback ) : Action
Результат Action

setDisable() публичный Метод

Callback should return TRUE if the action is not allowed for current item.
public setDisable ( $callback ) : Action
Результат Action

setElementPrototype() публичный Метод

Sets html element.
public setElementPrototype ( Nette\Utils\Html $elementPrototype ) : Action
$elementPrototype Nette\Utils\Html
Результат Action

setIcon() публичный Метод

Sets name of icon.
public setIcon ( string $name ) : Action
$name string
Результат Action

setOption() публичный Метод

Sets user-specific option.
public setOption ( string $key, mixed $value ) : Action
$key string
$value mixed
Результат Action

setPrimaryKey() публичный Метод

Sets primary key.
public setPrimaryKey ( string $primaryKey ) : Action
$primaryKey string
Результат Action

Описание свойств

$customRender защищенное свойство

for custom rendering
protected $customRender

$disable защищенное свойство

for disabling
protected $disable

$elementPrototype защищенное свойство

protected $elementPrototype
protected string $options
Результат string

$primaryKey защищенное свойство

- name of primary key f.e.: link->('Article:edit', array($primaryKey => 1))
protected $primaryKey