Class humhub\modules\content\widgets\WallCreateContentForm

Inheritancehumhub\modules\content\widgets\WallCreateContentForm » humhub\components\Widget » yii\base\Widget
Subclasseshumhub\modules\post\widgets\CreateForm, humhub\modules\post\widgets\Form

WallCreateContentForm is the base widget to create "quick" create content forms above Stream/Wall.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$form string Form implementation humhub\modules\content\widgets\WallCreateContentForm

Public Methods

Hide inherited methods

MethodDescriptionDefined By
create() Creates the given ContentActiveRecord based on given submitted form information. humhub\modules\content\widgets\WallCreateContentForm
getLayoutViewParams() Returns an array of view parameter used if \humhub\components\layout is set. humhub\components\Widget
init() humhub\modules\content\widgets\WallCreateContentForm
process() Process is a wrapper for the run method humhub\components\Widget
renderForm() Returns the custom form implementation. humhub\modules\content\widgets\WallCreateContentForm
run() humhub\modules\content\widgets\WallCreateContentForm
widget() Creates a widget instance and runs it. humhub\components\Widget


Hide inherited events

EventTypeDescriptionDefined By
EVENT_CREATE humhub\libs\WidgetCreateEvent An event raised before creating a widget. humhub\components\Widget

Property Details

$contentContainer public property

This content will belong to

$form protected property

Form implementation

protected string $form ""
$submitButtonText public property

Submit button text

public string $submitButtonText null
$submitUrl public property

Form submit route/url (required)

public string $submitUrl null

Method Details

create() public static method

Creates the given ContentActiveRecord based on given submitted form information.

  • Automatically assigns ContentContainer
  • Access Check
  • User Notification / File Uploads
  • Reloads Wall after successfull creation or returns error json

See guide section

public static array create ( humhub\modules\content\components\ContentActiveRecord $record, humhub\modules\content\components\ContentContainerActiveRecord $contentContainer null )
$record humhub\modules\content\components\ContentActiveRecord
return array


init() public method

public void init ( )
renderForm() public method

Returns the custom form implementation.

public string renderForm ( )
run() public method

public void run ( )