Class humhub\modules\content\widgets\WallEntryControls

Inheritancehumhub\modules\content\widgets\WallEntryControls » humhub\modules\ui\menu\widgets\Menu » humhub\widgets\JsWidget » humhub\components\Widget » yii\base\Widget

This widget is responsible for rendering the context menu for wallentries.

The default context menu can be extended by overwriting the getContextMenu function of the WallEntryWidget.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$entries humhub\modules\ui\menu\MenuEntry[] The menu entries humhub\modules\ui\menu\widgets\Menu

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addEntry() Add new menu entry to the navigation humhub\modules\ui\menu\widgets\Menu
addItem() humhub\modules\ui\menu\widgets\Menu
addItemGroup() humhub\modules\ui\menu\widgets\Menu
addWidget() humhub\modules\content\widgets\WallEntryControls
deleteItemByUrl() humhub\modules\ui\menu\widgets\Menu
getActive() humhub\modules\ui\menu\widgets\Menu
getActiveEntry() Returns the first active menu entry humhub\modules\ui\menu\widgets\Menu
getAttributes() Returns all html attributes for used by this widget and will normally inserted in the widgets root html element. humhub\modules\content\widgets\WallEntryControls
getData() Returns an array of data-* attributes to configure your clientside js widget. humhub\modules\ui\menu\widgets\Menu
getEntries() Returns all entries filtered by $type. If no $type filter is given all entries are returned. humhub\modules\ui\menu\widgets\Menu
getEntryById() Returns the first entry with the given id humhub\modules\ui\menu\widgets\Menu
getEntryByUrl() Returns the first entry with the given URL humhub\modules\ui\menu\widgets\Menu
getFirstEntry() humhub\modules\ui\menu\widgets\Menu
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
getItemGroups() humhub\modules\ui\menu\widgets\Menu
getItems() humhub\modules\ui\menu\widgets\Menu
getLayoutViewParams() Returns an array of view parameter used if \humhub\components\layout is set. humhub\components\Widget
getSortedEntries() Sorts the entry list by sortOrder and returns the sorted entry list. humhub\modules\ui\menu\widgets\Menu
hasMultipleEntries() Checks if this menu contains multiple entries of the given $type, or at all if no $type filter is given. humhub\modules\ui\menu\widgets\Menu
isAssoc() Checks if the given $array is an associative array or not. humhub\modules\content\widgets\WallEntryControls
markAsActive() This function provides static menu entry activation, by entry id or url. humhub\modules\ui\menu\widgets\Menu
markAsInactive() This function provides static menu entry inactivation, by entry id or url. humhub\modules\ui\menu\widgets\Menu
process() Process is a wrapper for the run method humhub\components\Widget
removeEntry() Removes the entry from the navigation humhub\modules\ui\menu\widgets\Menu
run() Executes the navigation widget. humhub\modules\content\widgets\WallEntryControls
setActive() Activates an entry by given id or url search string. humhub\modules\ui\menu\widgets\Menu
setDefaultOptions() Sets some default data options required by all widgets as the widget implementation and the widget events and initialization trigger. humhub\widgets\JsWidget
setEntryActive() Sets an menu entry active and inactive all other entries humhub\modules\ui\menu\widgets\Menu
setInactive() humhub\modules\ui\menu\widgets\Menu
setViewState() humhub\modules\ui\menu\widgets\Menu
widget() Creates a widget instance and runs it. humhub\components\Widget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getOptions() Assembles all widget attributes and data settings of this widget. humhub\widgets\JsWidget
getViewParams() Returns the parameters which are passed to the view template humhub\modules\ui\menu\widgets\Menu
getWallEntryLink() Returns the widget definition for the given $menuItem. humhub\modules\content\widgets\WallEntryControls

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_CREATE humhub\libs\WidgetCreateEvent An event raised before creating a widget. humhub\components\Widget
EVENT_RUN \humhub\modules\ui\menu\widgets\MenuEvent An event raised before running the navigation widget. humhub\modules\ui\menu\widgets\Menu

Property Details

$object public property
$template public property

Template view file of the navigation

public string $template '@content/widgets/views/wallEntryControls'
$wallEntryWidget public property

Method Details

addWidget() public method

public void addWidget ( $className, $params = [], $options = [] )
$className
$params
$options
getAttributes() public method

Returns all html attributes for used by this widget and will normally inserted in the widgets root html element.

public [] getAttributes ( )
getWallEntryLink() protected method

Returns the widget definition for the given $menuItem.

The $menuItem can either be given as single array:

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

or as widget type definition:

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

protected humhub\modules\ui\menu\MenuEntry getWallEntryLink ( $menuItem )
$menuItem []
isAssoc() public method

Checks if the given $array is an associative array or not.

public boolean isAssoc ( $arr )
$arr array
run() public method

Executes the navigation widget.

public string run ( )
return string

The result of navigation widget execution to be outputted.