Class humhub\modules\user\controllers\ImageController

Inheritancehumhub\modules\user\controllers\ImageController » humhub\modules\user\components\BaseAccountController » humhub\components\Controller » yii\web\Controller
Available since version1.2

ImageController handles user profile or user banner image modifications

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$actionTitlesMap array Page titles humhub\components\Controller
$allowModifyProfileBanner boolean Allow modification of profile banner Note: this value may be changed via events (e.g. block auto synced images) humhub\modules\user\controllers\ImageController
$allowModifyProfileImage boolean Allow modification of profile image Note: this value may be changed via events (e.g. block auto synced images) humhub\modules\user\controllers\ImageController
$pageTitle string Title of the rendered page humhub\components\Controller
$prependActionTitles boolean Append page title humhub\components\Controller
$subLayout null|string The name of the sub layout to be applied to this controller's views. humhub\modules\user\components\BaseAccountController
$user humhub\modules\user\models\User The user humhub\modules\user\components\BaseAccountController

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
actionCrop() Crops a image humhub\modules\user\controllers\ImageController
actionDelete() Delete an image humhub\modules\user\controllers\ImageController
actionUpload() Uploads a new image humhub\modules\user\controllers\ImageController
appendPageTitle() Append a page title. humhub\components\Controller
beforeAction() humhub\components\Controller
behaviors() humhub\components\Controller
forcePostRequest() Throws HttpException in case the request is not an post request, otherwise returns true. humhub\components\Controller
getAccess() humhub\components\Controller
getAccessRules() Returns access rules for the standard access control behavior. humhub\modules\user\components\BaseAccountController
getUser() Returns the current user of this account humhub\modules\user\controllers\ImageController
htmlRedirect() Create Redirect for AJAX Requests which output goes into HTML content. humhub\components\Controller
init() humhub\modules\user\controllers\ImageController
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

Events

Hide inherited events

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

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
TYPE_PROFILE_BANNER_IMAGE 'banner' humhub\modules\user\controllers\ImageController
TYPE_PROFILE_IMAGE 'image' humhub\modules\user\controllers\ImageController

Property Details

$allowModifyProfileBanner public property

Allow modification of profile banner Note: this value may be changed via events (e.g. block auto synced images)

$allowModifyProfileImage public property

Allow modification of profile image Note: this value may be changed via events (e.g. block auto synced images)

Method Details

actionCrop() public method

Crops a image

public \yii\web\Response actionCrop ( $type )
$type string
return \yii\web\Response

The response

actionDelete() public method

Delete an image

public \yii\web\Response actionDelete ( $type )
$type string
return \yii\web\Response

The response

actionUpload() public method

Uploads a new image

public \yii\web\Response actionUpload ( $type )
$type string
return \yii\web\Response

The response

getProfileImage() protected method

Returns the Profile Image

protected humhub\libs\ProfileImage|humhub\libs\ProfileBannerImage getProfileImage ( $type )
$type string
throws \yii\web\HttpException
getUser() public method

Returns the current user of this account

An administration can also pass a user id via GET parameter to change users accounts settings.

public humhub\modules\user\models\User getUser ( )
return humhub\modules\user\models\User

The user

init() public method

public void init ( )