Class humhub\modules\user\models\Mentioning

Inheritancehumhub\modules\user\models\Mentioning » humhub\components\ActiveRecord » yii\db\ActiveRecord

This is the model class for table "user_mentioning".

The followings are the available columns in table 'user_mentioning':

Public Methods

Hide inherited methods

MethodDescriptionDefined By
afterSave() humhub\modules\user\models\Mentioning
beforeSave() humhub\components\ActiveRecord
behaviors() humhub\modules\user\models\Mentioning
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
getUniqueId() Returns a unique id for this record/model humhub\components\ActiveRecord
getUpdatedBy() Relation to User defined in updated_by attribute humhub\components\ActiveRecord
getUser() Related user humhub\modules\user\models\Mentioning
mention() Creates the mentioning for the given $guids. humhub\modules\user\models\Mentioning
parse() Parses a given text for mentioned users and creates an mentioning for them. humhub\modules\user\models\Mentioning
rules() humhub\modules\user\models\Mentioning
serialize() Serializes attributes and oldAttributes of this record. humhub\components\ActiveRecord
tableName() humhub\modules\user\models\Mentioning
unserialize() Unserializes the given string, calls the init() function and sets the attributes and oldAttributes. humhub\components\ActiveRecord

Method Details

afterSave() public method

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

public void behaviors ( )
getUser() public method

Related user

public \yii\db\ActiveQuery getUser ( )
mention() public static method (available since version 1.3)

Creates the mentioning for the given $guids.

This function will skip $guids which are already mentioned in the given $record.

public static array mention ( $guids, $record )
$guids string|string[]
$record humhub\modules\content\components\ContentActiveRecord|humhub\modules\content\components\ContentAddonActiveRecord
return array

New mentionings for the given $record

throws \yii\base\InvalidArgumentException

if an invalid $record is provided

parse() public static method
Deprecated since 1.3 use humhub\modules\content\widgets\richtext\RichText::processText() instead

Parses a given text for mentioned users and creates an mentioning for them.

public static humhub\modules\user\models\User[] parse ( $record, $text )
$record humhub\modules\content\components\ContentActiveRecord|humhub\modules\content\components\ContentAddonActiveRecord
$text string
return humhub\modules\user\models\User[]

Mentioned users

throws \yii\base\Exception
rules() public method

public void rules ( )
tableName() public static method

public static void tableName ( )