Inpsyde\MultilingualPress\Widget\Dashboard\DashboardWidget::__construct PHP Method

__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.
    public function __construct($id, $name, View $view, $capability = '', array $callback_args = [], callable $control_callback = null)
    {
        $this->id = (string) $id;
        $this->name = (string) $name;
        $this->view = $view;
        $this->capability = (string) $capability;
        $this->callback_args = $callback_args;
        $this->control_callback = $control_callback;
    }