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
getWallEntryViewParams() Returns the view paramters for the wall entry layout 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\modules\content\widgets\WallEntry

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
public string $wallEntryLayout "@humhub/modules/content/widgets/views/wallEntry.php"

Method Details

addControl() protected method

protected void addControl ( &$result, $options )
$result
$options
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

getWallEntryViewParams() public method

Returns the view paramters for the wall entry layout

public array getWallEntryViewParams ( )
return array

The view parameter array

renderWallEntry() public method

Renders the wall entry output

public string renderWallEntry ( )
return string

The output

throws Exception
widget() public static method

Creates a widget instance and runs it.

The widget rendering result is returned by this method.

public static string widget ( $config = [] )
$config array

Name-value pairs that will be used to initialize the object properties

return string

The rendering result of the widget.

throws Exception