Maslosoft Framework Logo Maslosoft Framework Documentation
Flexible Application Foundation


This widget creates set of buttons bound to it's actions. Buttons can have numerous and growing list of options.

Example of basic configuration of Toolbar with one button. Consult Toolbar Button documentation for details, as it is not directly related to Toolbar itself.

Note that $buttons property is array of array of button configurations.

echo Toolbar::widget([
	'buttons' => [
			'binding' => false,
			'label' => 'MyButton',
			'action' => 'alert'

Full list of configurable options of toolbar include:

Property Documentation

Base binding for actions binding, this will be prepended to any action JavaScript reference.


(Predefined) Button set to apply to toolbar Use special value of Toolbar::Current, which will be replaced by buttons configuration, thus allowing to inject buttons between button sets.


Buttons for this toolbar, can be inserted into buttonSet or used alone to configure toolbar without extra preset.


Toolbar caption, displayed above toolbar, specially useful for floating toolbars


Leave null to autodetect dark mode, ie when it is floating.

By defaults it is not dark, the value is set in init method.


Will add ovr class for floating toolbar


Horizontal, or vertical toolbar


Scope for hotkeys


Id of widget.

This might be used by widget in HTML, but no assumptions should be taken for that matter. ID's are in many cases generated automatically and it's value might change between page loads.


Set this to true to display toolbar as inline-block element. This is suitable to place toolbar as a grid item.


Js widget instance. This is JavaScript reference to current widget client side implementation.

This allows to invoke JavaScript methods, or set object properties with PHP. This will not encode value automatically, allowing to set JavaScript reference as a method parameter or property value.

Example of invoking method:

$widget->jsRef->setName(JavaScript::encode('Some name'));

Example of setting property:

$widget->jsRef->name = JavaScript::encode('Some name');

Model on which widget will operate.

It is recommended for model to implement AnnotatedInterface.