PHP Class Inpsyde\MultilingualPress\Common\Admin\SitesListTableColumn

Since: 3.0.0
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( string $id, string $name, callable $render_callback, callable $add_callback = null ) Constructor. Sets up the properties.
add ( array $columns ) : array Adds the column.
register ( ) : void Registers the column methods by using the appropriate WordPress hooks.
render_content ( string $id, integer $site_id ) : boolean Renders the column content.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $id, string $name, callable $render_callback, callable $add_callback = null )
$id string Column ID.
$name string Column name.
$render_callback callable Callback for rendering the column content.
$add_callback callable Optional. Callback to handle adding the column. Defaults to null.

add() public method

Adds the column.
Since: 3.0.0
public add ( array $columns ) : array
$columns array The current columns.
return array All columns.

register() public method

Registers the column methods by using the appropriate WordPress hooks.
Since: 3.0.0
public register ( ) : void
return void

render_content() public method

Renders the column content.
Since: 3.0.0
public render_content ( string $id, integer $site_id ) : boolean
$id string Column ID.
$site_id integer Site ID.
return boolean Whether or not the content was rendered successfully.