Abstract Class humhub\modules\content\controllers\ContainerImageController

Inheritancehumhub\modules\content\controllers\ContainerImageController » humhub\modules\content\components\ContentContainerController » humhub\components\Controller » yii\web\Controller
Subclasseshumhub\modules\space\modules\manage\controllers\ImageController, humhub\modules\user\controllers\ImageController
Available since version1.4

Contains profile image and profile banner image upload actions.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$actionTitlesMap array Page titles humhub\components\Controller
$bannerUploadName string File upload name for banner image, this exists due to legacy compatibility for views prio to v1. humhub\modules\content\controllers\ContainerImageController
$contentContainer humhub\modules\content\components\ContentContainerActiveRecord The content container (e.g. Space or User record) humhub\modules\content\components\ContentContainerController
$imageUploadName string File upload name for profile image, this exists due to legacy compatibility for views prio to v1. humhub\modules\content\controllers\ContainerImageController
$pageTitle string Title of the rendered page humhub\components\Controller
$prependActionTitles boolean Append page title humhub\components\Controller
$requireContainer boolean Require cguid container parameter humhub\modules\content\components\ContentContainerController
$subLayout null|string The name of the sub layout to be applied to this controller's views. humhub\components\Controller
$validContentContainerClasses array|null An array of valid content container classes. humhub\modules\content\components\ContentContainerController

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
actionBannerUpload() Handle the banner image upload humhub\modules\content\controllers\ContainerImageController
actionCrop() Crops the space image humhub\modules\content\controllers\ContainerImageController
actionCropBanner() Crops the banner image humhub\modules\content\controllers\ContainerImageController
actionDelete() Deletes the profile image or profile banner humhub\modules\content\controllers\ContainerImageController
actionUpload() Handle the profile image upload humhub\modules\content\controllers\ContainerImageController
appendPageTitle() Append a page title. humhub\components\Controller
beforeAction() humhub\modules\content\components\ContentContainerController
behaviors() humhub\components\Controller
forcePostRequest() Throws HttpException in case the request is not an post request, otherwise returns true. humhub\components\Controller
getAccess() humhub\modules\content\components\ContentContainerController
handleCrop() humhub\modules\content\controllers\ContainerImageController
htmlRedirect() Create Redirect for AJAX Requests which output goes into HTML content. humhub\components\Controller
init() humhub\modules\content\components\ContentContainerController
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\content\controllers\ContainerImageController
TYPE_PROFILE_IMAGE 'image' humhub\modules\content\controllers\ContainerImageController

Property Details

$bannerUploadName public property

File upload name for banner image, this exists due to legacy compatibility for views prio to v1.4

public string $bannerUploadName 'images'
$imageUploadName public property

File upload name for profile image, this exists due to legacy compatibility for views prio to v1.4

public string $imageUploadName 'images'

Method Details

actionBannerUpload() public method

Handle the banner image upload

public void actionBannerUpload ( )
actionCrop() public method

Crops the space image

public void actionCrop ( $type self::TYPE_PROFILE_IMAGE )
$type
actionCropBanner() public method

Crops the banner image

public void actionCropBanner ( )
actionDelete() public method

Deletes the profile image or profile banner

public void actionDelete ( $type )
$type
throws \yii\web\HttpException
actionUpload() public method

Handle the profile image upload

public void actionUpload ( $type self::TYPE_PROFILE_IMAGE )
$type
getImageByType() protected method

protected humhub\libs\ProfileImage getImageByType ( $type )
$type
handleCrop() public method

public void handleCrop ( $type self::TYPE_PROFILE_IMAGE )
$type
handleImageUpload() protected method

protected \yii\web\Response handleImageUpload ( $uploadName, $type self::TYPE_PROFILE_IMAGE )
$uploadName

String

$type string