Class humhub\modules\content\widgets\WallEntry

Inheritancehumhub\modules\content\widgets\WallEntry » humhub\components\Widget » yii\base\Widget
Subclasseshumhub\modules\activity\widgets\Activity, humhub\modules\post\widgets\WallEntry
Available since version0.20

WallEntry is responsible to show a content inside a stream/wall.

See also humhub\modules\content\components\ContentActiveRecord.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getContextMenu() Returns an array of context menu items either in form of a single array: humhub\modules\content\widgets\WallEntry
getEditUrl() Returns the edit url to edit the content (if supported) humhub\modules\content\widgets\WallEntry
getLayoutViewParams() Returns an array of view parameter used if \humhub\modules\content\widgets\layout is set. humhub\modules\content\widgets\WallEntry
getWallEntryViewParams() Returns the view paramters for the wall entry layout humhub\modules\content\widgets\WallEntry
init() humhub\modules\content\widgets\WallEntry
process() Process is a wrapper for the run method humhub\components\Widget
renderWallEntry() Renders the wall entry output humhub\modules\content\widgets\WallEntry
widget() Creates a widget instance and runs it. humhub\components\Widget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
addControl() humhub\modules\content\widgets\WallEntry

Events

Hide inherited events

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

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
EDIT_MODE_INLINE 'inline' Edit form is loaded to the wallentry itself. humhub\modules\content\widgets\WallEntry
EDIT_MODE_MODAL 'modal' Edit form is loaded into a modal. humhub\modules\content\widgets\WallEntry
EDIT_MODE_NEW_WINDOW 'new_window' Opens the edit page in a new window. humhub\modules\content\widgets\WallEntry

Property Details

$addonOptions public property
public array $addonOptions = []
$contentObject public property
$controlsOptions public property
public array $controlsOptions = []
$editMode public property
public string $editMode self::EDIT_MODE_INLINE
$editRoute public property
public string $editRoute ""
$jsWidget public property

Defines the wallEntry Javascript implementation.

public string $jsWidget "stream.StreamEntry"
$justEdited public property
public boolean $justEdited false
$renderAddons public property

If set to false, the WallEntryAddons won't be rendered (like/comments/etc)

public boolean $renderAddons true
$renderControls public property

If set to false, the WallEntryControls won't be rendered

public boolean $renderControls true
$showFiles public property
Deprecated since 1.2 use $addonOptions of ShowFiles Widget or disable 'show_in_stream' file flag.

Show files widget containing a list of all assigned files

public boolean $showFiles true
$wallEntryLayout public property
Deprecated since 1.4 use $widgetLayout instead
public string $wallEntryLayout "@humhub/modules/content/widgets/views/wallEntry.php"

Method Details

addControl() protected method

protected void addControl ( &$result, $entry )
$result
$entry
getContextMenu() public method (available since version 1.2)

Returns an array of context menu items either in form of a single array:

['label' => 'mylabel', 'icon' => 'fa-myicon', 'data-action-click' => 'myaction', ...]

or as widget type definition:

[MyWidget::class, [...], [...]]

If an $editRoute is set this function will include an edit button. The edit logic can be changed by changing the $editMode.

public array getContextMenu ( )
getEditUrl() public method

Returns the edit url to edit the content (if supported)

public string getEditUrl ( )
return string

Url

getLayoutViewParams() public method

Returns an array of view parameter used if \humhub\modules\content\widgets\layout is set.

By default the actual widget output created by \humhub\modules\content\widgets\run() is set as content param.

public array getLayoutViewParams ( )
getWallEntryViewParams() public method
Deprecated since 1.4 use getLayoutViewParams() instead

Returns the view paramters for the wall entry layout

public array getWallEntryViewParams ( )
return array

The view parameter array

init() public method

public void init ( )
renderWallEntry() public method
Deprecated since 1.4

Renders the wall entry output

Note this function does not call

public string renderWallEntry ( )
return string

The output

throws Exception