Class humhub\modules\stream\widgets\StreamViewer

Inheritancehumhub\modules\stream\widgets\StreamViewer » humhub\widgets\JsWidget » humhub\components\Widget » yii\base\Widget
Subclasseshumhub\modules\activity\widgets\ActivityStreamViewer, humhub\modules\activity\widgets\Stream, humhub\modules\user\widgets\StreamViewer
Available since version1.2

Stream View Widget creates a stream.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$container string Html container element. humhub\widgets\JsWidget
$content string Html content. humhub\widgets\JsWidget
$contentContainer humhub\modules\content\components\ContentContainerActiveRecord The content container if this stream belongs to one (optional) humhub\modules\stream\widgets\StreamViewer
$events [] humhub\widgets\JsWidget
$fadeIn boolean|string|integer humhub\widgets\JsWidget
$filters array List of active filters filters to show this will be set as \humhub\modules\stream\widgets\StreamFilter::definition when rendering the filter navigation humhub\modules\stream\widgets\StreamViewer
$id string humhub\modules\stream\widgets\StreamViewer
$init mixed humhub\modules\stream\widgets\StreamViewer
$jsWidget string humhub\modules\stream\widgets\StreamViewer
$messageStreamEmpty string The message when stream is empty humhub\modules\stream\widgets\StreamViewer
$messageStreamEmptyCss string The CSS Class(es) for message when stream is empty humhub\modules\stream\widgets\StreamViewer
$messageStreamEmptyWithFilters string The message when stream is empty and filters are active humhub\modules\stream\widgets\StreamViewer
$messageStreamEmptyWithFiltersCss string The CSS Class(es) for empty stream error with enabled filters humhub\modules\stream\widgets\StreamViewer
$options humhub\widgets\JsWidget
$render boolean If set to false this widget won't be rendered humhub\components\Widget
$showFilters boolean humhub\modules\stream\widgets\StreamViewer
$streamAction string The path to Stream Action to use humhub\modules\stream\widgets\StreamViewer
$streamActionParams array Additional Params to add to Stream Action URL humhub\modules\stream\widgets\StreamViewer
$streamFilterNavigation string Definition of stream filter navigation widget class humhub\modules\stream\widgets\StreamViewer
$view string Stream view humhub\modules\stream\widgets\StreamViewer
$visible boolean humhub\widgets\JsWidget
$widgetLayout string Defines an optional layout humhub\components\Widget

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getData() humhub\modules\stream\widgets\StreamViewer
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
init() humhub\modules\stream\widgets\StreamViewer
process() Process is a wrapper for the run method humhub\components\Widget
run() Default implementation of JsWidget. humhub\modules\stream\widgets\StreamViewer
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
getAttributes() Returns all html attributes for used by this widget and will normally inserted in the widgets root html element. humhub\widgets\JsWidget
getOptions() Assembles all widget attributes and data settings of this widget. humhub\widgets\JsWidget
getStreamUrl() Creates url to stream BaseStreamAction including placeholders which are replaced and handled by javascript. humhub\modules\stream\widgets\StreamViewer

Events

Hide inherited events

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

Property Details

$contentContainer public property

The content container if this stream belongs to one (optional)

$filters public property

List of active filters filters to show this will be set as \humhub\modules\stream\widgets\StreamFilter::definition when rendering the filter navigation

public array $filters = []
$id public property
public string $id 'wallStream'
$init public property
public mixed $init true
$jsWidget public property
public string $jsWidget 'stream.wall.WallStream'
$messageStreamEmpty public property

The message when stream is empty

$messageStreamEmptyCss public property

The CSS Class(es) for message when stream is empty

$messageStreamEmptyWithFilters public property

The message when stream is empty and filters are active

$messageStreamEmptyWithFiltersCss public property

The CSS Class(es) for empty stream error with enabled filters

$showFilters public property
public boolean $showFilters true
$streamAction public property

The path to Stream Action to use

public string $streamAction ""
$streamActionParams public property (available since version 1.1)

Additional Params to add to Stream Action URL

$streamFilterNavigation public property

Definition of stream filter navigation widget class

public string $streamFilterNavigation = \humhub\modules\stream\widgets\WallStreamFilterNavigation::class
$view public property (available since version 1.3)

Stream view

public string $view '@stream/widgets/views/wallStream'

Method Details

getData() public method

public void getData ( )
getStreamUrl() protected method

Creates url to stream BaseStreamAction including placeholders which are replaced and handled by javascript.

If a contentContainer is specified it will be used to create the url.

protected string getStreamUrl ( )
init() public method

public void init ( )
throws \yii\base\InvalidConfigException
run() public method

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 ( )
throws \yii\base\InvalidConfigException