Class humhub\modules\ui\form\widgets\DurationPicker
Inheritance | humhub\modules\ui\form\widgets\DurationPicker » humhub\modules\ui\form\widgets\JsInputWidget » humhub\widgets\JsWidget » humhub\components\Widget » yii\base\Widget |
---|---|
Subclasses | humhub\widgets\DurationPicker |
Available since version | 1.3 |
DurationPicker renders an UI form widget to select time durations.
Public Properties
Public Methods
Method | Description | Defined By |
---|---|---|
beforeRun() | Initializes the widget. | humhub\modules\ui\form\widgets\JsInputWidget |
getDuration() | humhub\modules\ui\form\widgets\DurationPicker | |
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() | Default implementation of JsWidget. | humhub\modules\ui\form\widgets\DurationPicker |
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
Method | Description | Defined By |
---|---|---|
getAttributes() | Returns all html attributes for used by this widget and will normally inserted in the widgets root html element. | humhub\widgets\JsWidget |
getData() | Returns an array of data-* attributes to configure your clientside js widget. | humhub\widgets\JsWidget |
getOptions() | Assembles all widget attributes and data settings of this widget. | humhub\widgets\JsWidget |
getValue() | humhub\modules\ui\form\widgets\JsInputWidget | |
hasModel() | humhub\modules\ui\form\widgets\JsInputWidget |
Events
Event | Type | Description | Defined By |
---|---|---|---|
EVENT_CREATE | humhub\libs\WidgetCreateEvent | An event raised before creating a widget. | humhub\components\Widget |
Method Details
public static void getDuration ( DateTime $start, DateTime $end ) | ||
$start | ||
$end |
Default implementation of JsWidget.
This will render a widget html element specified by $container and $content and the given $options/$event attributes. This function should be overwritten for widgets with a more complex rendering.
public string run ( ) |