Class humhub\modules\user\models\Follow

Inheritancehumhub\modules\user\models\Follow » yii\db\ActiveRecord

This is the model class for table "user_follow".

Method Details

afterSave() public method

public void afterSave ( $insert, $changedAttributes )
$insert
$changedAttributes
beforeDelete() public method

public void beforeDelete ( )
behaviors() public method

public void behaviors ( )
getFollowedSpacesQuery() public static method (available since version 1.2)

Returns all followed spaces of the given user as ActiveQuery.

If $withNotifications is set only follower with the given send_notifications setting are returned.

public static \yii\db\ActiveQuery getFollowedSpacesQuery ( humhub\modules\user\models\User $user, $withNotifications null )
$user humhub\modules\user\models\User
$withNotifications boolean|null

By notification setting (default is null without notification handling)

return \yii\db\ActiveQuery

Space query of all followed spaces

getFollowersQuery() public static method

Returns all active users following the given $target record.

If $withNotifications is set only follower with the given send_notifications setting are returned.

public static humhub\modules\user\components\ActiveQueryUser getFollowersQuery ( \yii\db\ActiveRecord $target, $withNotifications null )
$target \yii\db\ActiveRecord
$withNotifications boolean
getTarget() public method

public void getTarget ( )
getUser() public method

public void getUser ( )
init() public method

public void init ( )
rules() public method

public void rules ( )
tableName() public static method

public static void tableName ( )

Event Details

EVENT_FOLLOWING_CREATED event of type humhub\modules\user\events\FollowEvent
EVENT_FOLLOWING_REMOVED event of type humhub\modules\user\events\FollowEvent