Class humhub\modules\like\controllers\LikeController

Inheritancehumhub\modules\like\controllers\LikeController » humhub\modules\content\components\ContentAddonController » humhub\components\Controller » yii\web\Controller
Available since version0.5

Like Controller

Handles requests by the like widgets. (e.g. like, unlike, show likes)

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$access string Defines the ControllerAccess class for this controller responsible for managing access rules humhub\components\Controller

Public Methods

Hide inherited methods

MethodDescriptionDefined By
actionLike() Creates a new like humhub\modules\like\controllers\LikeController
actionShowLikes() Returns an JSON with current like informations about a target humhub\modules\like\controllers\LikeController
actionUnlike() Unlikes an item humhub\modules\like\controllers\LikeController
actionUserList() Returns a user list which contains all users who likes it humhub\modules\like\controllers\LikeController
appendPageTitle() Append a page title. humhub\components\Controller
beforeAction() humhub\modules\like\controllers\LikeController
behaviors() humhub\modules\like\controllers\LikeController
forcePostRequest() Throws HttpException in case the request is not an post request, otherwise returns true. humhub\components\Controller
getAccess() humhub\components\Controller
htmlRedirect() Create Redirect for AJAX Requests which output goes into HTML content. humhub\components\Controller
init() humhub\components\Controller
loadContentAddon() Loads Content Addon We also validates that the content addon corresponds to the loaded content. humhub\modules\content\components\ContentAddonController
prependPageTitle() Prepend a page title. humhub\components\Controller
redirect() humhub\components\Controller
renderAjaxContent() humhub\components\Controller
renderContent() Renders a static string by applying the layouts (sublayout + layout. humhub\components\Controller
renderModalClose() Closes a modal humhub\components\Controller
setActionTitles() Set a map that indicates what page title should be shown for the currently active action. humhub\components\Controller
setJsViewStatus() Sets some ui state as current controller/module and active topmenu. humhub\components\Controller
setPageTitle() Set the page title. humhub\components\Controller

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
forbidden() humhub\components\Controller
getAccessRules() Returns access rules for the standard access control behavior. humhub\components\Controller


Hide inherited events

EventTypeDescriptionDefined By
EVENT_INIT \yii\base\Event An event raised on init a controller. humhub\components\Controller

Method Details

actionLike() public method

Creates a new like

public void actionLike ( )
actionShowLikes() public method

Returns an JSON with current like informations about a target

public void actionShowLikes ( )
actionUnlike() public method

Unlikes an item

public void actionUnlike ( )
actionUserList() public method

Returns a user list which contains all users who likes it

public void actionUserList ( )
beforeAction() public method

public boolean beforeAction ( $action )
throws \yii\web\HttpException
behaviors() public method

public void behaviors ( )