PHP Class Inpsyde\MultilingualPress\Widget\Dashboard\DashboardWidget

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

Public Methods

Method Description
__construct ( string $id, string $name, Inpsyde\MultilingualPress\Widget\Dashboard\View $view, string $capability = '', array $callback_args = [], callable $control_callback = null ) Constructor. Sets up the properties.
register ( ) : boolean Registers the widget.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $id, string $name, Inpsyde\MultilingualPress\Widget\Dashboard\View $view, string $capability = '', array $callback_args = [], callable $control_callback = null )
$id string Widget ID.
$name string Widget name.
$view Inpsyde\MultilingualPress\Widget\Dashboard\View View object.
$capability string Optional. Capability required to view the widget. Defaults to empty string.
$callback_args array Optional. Callback arguments. Defaults to empty array.
$control_callback callable Optional. Control callback. Defaults to null.

register() public method

Registers the widget.
Since: 3.0.0
public register ( ) : boolean
return boolean Whether or not the widget was registered successfully.