Class humhub\modules\activity\models\Activity

Inheritancehumhub\modules\activity\models\Activity » humhub\modules\content\components\ContentActiveRecord » humhub\components\ActiveRecord » yii\db\ActiveRecord
ImplementsSerializable, humhub\modules\content\interfaces\ContentOwner, humhub\modules\content\models\Movable

This is the model class for table "activity".

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$autoFollow boolean Should the originator automatically follows this content when saved. humhub\modules\activity\models\Activity
$silentContentCreation boolean humhub\modules\activity\models\Activity
$wallEntryClass string The WallEntry widget class humhub\modules\activity\models\Activity

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$canMove boolean Defines if the Movable behaviour of this ContentContainerActiveRecord type is active. humhub\modules\content\components\ContentActiveRecord
$initContent humhub\modules\content\models\Content Used to cache the content relation in order to avoid the relation to be overwritten in the insert process humhub\modules\content\components\ContentActiveRecord
$managePermission string Permission instance humhub\modules\content\components\ContentActiveRecord
$moduleId string Related moduleId humhub\modules\content\components\ContentActiveRecord
$streamChannel string|null The stream channel humhub\modules\activity\models\Activity

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() ContentActiveRecord constructor accepts either an configuration array as first argument or an ContentContainerActiveRecord and visibility settings. humhub\modules\content\components\ContentActiveRecord
__get() humhub\modules\content\components\ContentActiveRecord
afterDelete() humhub\modules\content\components\ContentActiveRecord
afterMove() This function can be overwritten in order to define model specific logic as moving sub-content or other related humhub\modules\content\components\ContentActiveRecord
afterSave() humhub\modules\content\components\ContentActiveRecord
beforeSave() humhub\modules\content\components\ContentActiveRecord
behaviors() humhub\modules\activity\models\Activity
canMove() Can be overwritten to define additional model specific checks. humhub\modules\content\components\ContentActiveRecord
find() Returns an ActiveQueryContent to find content. humhub\modules\content\components\ContentActiveRecord
getActivityBaseClass() Returns the related BaseActivity object of this Activity record. humhub\modules\activity\models\Activity
getContent() Related Content model humhub\modules\content\components\ContentActiveRecord
getContentDescription() Returns a description of this particular content. humhub\modules\content\components\ContentActiveRecord
getContentName() Returns the name of this type of content. humhub\modules\content\components\ContentActiveRecord
getCreatedBy() Relation to User defined in created_by attribute humhub\components\ActiveRecord
getErrorMessage() Returns the errors as string for all attribute or a single attribute. humhub\components\ActiveRecord
getFileManager() Returns the file manager for this record humhub\components\ActiveRecord
getIcon() Can be used to define an icon for this content type e.g.: 'fa-calendar'. humhub\modules\content\components\ContentActiveRecord
getLabels() Returns either Label widget instances or strings. humhub\modules\content\components\ContentActiveRecord
getManagePermission() Returns the $managePermission settings interpretable by an PermissionManager instance. humhub\modules\content\components\ContentActiveRecord
getModuleId() Returns the id of the module related to this content type Note: This may not be implemented by some legacy modules humhub\modules\content\components\ContentActiveRecord
getObjectModel() humhub\modules\content\components\ContentActiveRecord
getOwner() humhub\modules\content\components\ContentActiveRecord
getSource() Returns the source object which belongs to this Activity. humhub\modules\activity\models\Activity
getUniqueId() Returns a unique id for this record/model humhub\components\ActiveRecord
getUpdatedBy() Relation to User defined in updated_by attribute humhub\components\ActiveRecord
getWallEntryWidget() Returns the assigned wall entry widget instance humhub\modules\content\components\ContentActiveRecord
getWallOut() Returns the wall output widget of this content. humhub\modules\activity\models\Activity
hasManagePermission() Determines weather or not this records has an additional managePermission set. humhub\modules\content\components\ContentActiveRecord
init() humhub\modules\content\components\ContentActiveRecord
isOwner() Checks if the given user or the current logged in user if no user was given, is the owner of this content humhub\modules\content\components\ContentActiveRecord
move() {@inheritdoc} humhub\modules\content\components\ContentActiveRecord
rules() humhub\modules\activity\models\Activity
serialize() Serializes attributes and oldAttributes of this record. humhub\components\ActiveRecord
tableName() humhub\modules\activity\models\Activity
unserialize() Unserializes the given string, calls the init() function and sets the attributes and oldAttributes. humhub\components\ActiveRecord

Property Details

$autoFollow public property

Should the originator automatically follows this content when saved.

public boolean $autoFollow false
$silentContentCreation public property
$streamChannel protected property

The stream channel

protected string|null $streamChannel 'activity'
$wallEntryClass public property

The WallEntry widget class

public string $wallEntryClass 'humhub\modules\activity\widgets\Activity'

Method Details

behaviors() public method

public void behaviors ( )
getActivityBaseClass() public method

Returns the related BaseActivity object of this Activity record.

public humhub\modules\activity\components\BaseActivity getActivityBaseClass ( )
throws \yii\base\Exception
throws \yii\base\InvalidConfigException
throws \yii\db\IntegrityException
getSource() public method

Returns the source object which belongs to this Activity.

See also humhub\modules\activity\components\BaseActivity::$source.

public mixed getSource ( )
throws \yii\db\IntegrityException
getWallOut() public method

Returns the wall output widget of this content.

public string getWallOut ( $params = [] )
$params array

Optional parameters for WallEntryWidget

throws Exception
rules() public method

public void rules ( )
tableName() public static method

public static void tableName ( )