PHP Class Grido\Components\Actions\Action

Author: Petr Bugyík
Inheritance: extends Grido\Components\Component
Afficher le fichier Open project: o5/grido Class Usage Examples

Protected Properties

Свойство Type Description
$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))

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

getElement() public méthode

public getElement ( mixed $row ) : Nette\Utils\Html
$row mixed
Résultat Nette\Utils\Html
Returns user-specific option.
public getOption ( string $key, mixed $default = NULL ) : mixed
$key string
$default mixed
Résultat mixed

getOptions() public méthode

Returns user-specific options.
public getOptions ( ) : array
Résultat array

getPrimaryKey() public méthode

public getPrimaryKey ( ) : string
Résultat string

render() public méthode

public render ( mixed $row ) : void
$row mixed
Résultat void

setConfirm() public méthode

Sets client side confirm.
public setConfirm ( string | callback $confirm ) : Action
$confirm string | callback
Résultat Action

setCustomRender() public méthode

Sets callback for custom rendering.
public setCustomRender ( $callback ) : Action
Résultat Action

setDisable() public méthode

Callback should return TRUE if the action is not allowed for current item.
public setDisable ( $callback ) : Action
Résultat Action

setElementPrototype() public méthode

Sets html element.
public setElementPrototype ( Nette\Utils\Html $elementPrototype ) : Action
$elementPrototype Nette\Utils\Html
Résultat Action

setIcon() public méthode

Sets name of icon.
public setIcon ( string $name ) : Action
$name string
Résultat Action

setOption() public méthode

Sets user-specific option.
public setOption ( string $key, mixed $value ) : Action
$key string
$value mixed
Résultat Action

setPrimaryKey() public méthode

Sets primary key.
public setPrimaryKey ( string $primaryKey ) : Action
$primaryKey string
Résultat Action

Property Details

$customRender protected_oe property

for custom rendering
protected $customRender

$disable protected_oe property

for disabling
protected $disable

$elementPrototype protected_oe property

protected $elementPrototype
protected string $options
Résultat string

$primaryKey protected_oe property

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