Class humhub\modules\admin\widgets\ExportButton

Inheritancehumhub\modules\admin\widgets\ExportButton » humhub\components\Widget » yii\base\Widget

Class ExportButton

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$filter string|null humhub\modules\admin\widgets\ExportButton
$render boolean If set to false this widget won't be rendered humhub\components\Widget

Public Methods

Hide inherited methods

MethodDescriptionDefined By
beforeRun() This method is invoked right before the widget is executed. humhub\modules\admin\widgets\ExportButton
process() Process is a wrapper for the run method humhub\components\Widget
run() Executes the widget. humhub\modules\admin\widgets\ExportButton
widget() Creates a widget instance and runs it. humhub\components\Widget

Events

Hide inherited events

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

Property Details

$filter public property
public string|null $filter null

Method Details

beforeRun() public method (available since version 2.0.11)

This method is invoked right before the widget is executed.

The method will trigger the \humhub\modules\admin\widgets\EVENT_BEFORE_RUN event. The return value of the method will determine whether the widget should continue to run.

When overriding this method, make sure you call the parent implementation like the following:

public function beforeRun()
{
    if (!parent::beforeRun()) {
        return false;
    }

    // your custom code here

    return true; // or false to not run the widget
}
public boolean beforeRun ( )
return boolean

Whether the widget should continue to be executed.

run() public method

Executes the widget.

public string run ( )
return string

The result of widget execution to be outputted.