Class humhub\widgets\GlobalModal

Inheritancehumhub\widgets\GlobalModal » humhub\widgets\Modal » humhub\widgets\JsWidget » humhub\components\Widget » yii\base\Widget
Available since version1.1

GlobalModal is the standard modal which can be used in every layout.

This widget is automatically added to the page via the LayoutAddons.

See also humhub\widgets\LayoutAddons.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getAttributes() humhub\widgets\Modal
getData() humhub\widgets\Modal
getId() Returns the html id of this widget, if no id is set this function will generate an id if $autoGenerate is set to true (default). humhub\widgets\JsWidget
getLayoutViewParams() Returns an array of view parameter used if \humhub\components\layout is set. humhub\components\Widget
process() Process is a wrapper for the run method humhub\components\Widget
run() humhub\widgets\Modal
setDefaultOptions() Sets some default data options required by all widgets as the widget implementation and the widget events and initialization trigger. humhub\widgets\JsWidget
widget() Creates a widget instance and runs it. humhub\components\Widget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getOptions() Assembles all widget attributes and data settings of this widget. humhub\widgets\JsWidget


Hide inherited events

EventTypeDescriptionDefined By
EVENT_CREATE humhub\libs\WidgetCreateEvent An event raised before creating a widget. humhub\components\Widget

Property Details

$backdrop public property

It's false because it's often used for serious work, for example html forms, accidental closing of which can lead to loss of user data.

public boolean $backdrop false
$id public property

This id need to js scripts

public string $id 'globalModal'