Class humhub\components\ActiveRecord

Inheritancehumhub\components\ActiveRecord » yii\db\ActiveRecord
ImplementsSerializable
Subclasseshumhub\modules\activity\models\Activity, humhub\modules\admin\models\GroupSearch, humhub\modules\admin\models\PendingRegistrationSearch, humhub\modules\admin\models\SpaceSearch, humhub\modules\admin\models\UserApprovalSearch, humhub\modules\admin\models\UserSearch, humhub\modules\admin\models\forms\UserEditForm, humhub\modules\comment\models\Comment, humhub\modules\content\components\ContentActiveRecord, humhub\modules\content\components\ContentAddonActiveRecord, humhub\modules\content\components\ContentContainerActiveRecord, humhub\modules\content\models\Content, humhub\modules\content\models\ContentDeprecated, humhub\modules\content\models\ContentTag, humhub\modules\content\models\ContentTagRelation, humhub\modules\file\models\File, humhub\modules\file\models\FileCompat, humhub\modules\file\models\FileContent, humhub\modules\file\models\FileUpload, humhub\modules\friendship\models\Friendship, humhub\modules\like\models\Like, humhub\modules\live\models\Live, humhub\modules\notification\models\Notification, humhub\modules\post\models\Post, humhub\modules\space\models\Membership, humhub\modules\space\models\Space, humhub\modules\space\modules\manage\models\AdvancedSettingsSpace, humhub\modules\space\modules\manage\models\MembershipSearch, humhub\modules\topic\models\Topic, humhub\modules\user\models\Group, humhub\modules\user\models\GroupAdmin, humhub\modules\user\models\GroupUser, humhub\modules\user\models\Invite, humhub\modules\user\models\Mentioning, humhub\modules\user\models\ProfileField, humhub\modules\user\models\ProfileFieldCategory, humhub\modules\user\models\Session, humhub\modules\user\models\User, humhub\modules\user\models\UserFilter, humhub\modules\user\models\forms\EditGroupForm

Description of ActiveRecord

Public Methods

Hide inherited methods

MethodDescriptionDefined By
beforeSave() humhub\components\ActiveRecord
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
serialize() Serializes attributes and oldAttributes of this record. humhub\components\ActiveRecord
unserialize() Unserializes the given string, calls the init() function and sets the attributes and oldAttributes. humhub\components\ActiveRecord

Method Details

beforeSave() public method

public void beforeSave ( $insert )
$insert
getCreatedBy() public method

Relation to User defined in created_by attribute

public humhub\modules\user\models\User|null getCreatedBy ( )
getErrorMessage() public method (available since version 1.2)

Returns the errors as string for all attribute or a single attribute.

public string getErrorMessage ( $attribute null )
$attribute string

Attribute name. Use null to retrieve errors for all attributes.

return string

The error message

getFileManager() public method

Returns the file manager for this record

public humhub\modules\file\components\FileManager getFileManager ( )
return humhub\modules\file\components\FileManager

The file manager instance

getUniqueId() public method

Returns a unique id for this record/model

public String getUniqueId ( )
return String

Unique Id of this record

getUpdatedBy() public method

Relation to User defined in updated_by attribute

public humhub\modules\user\models\User|null getUpdatedBy ( )
serialize() public method (available since version 1.2)

Serializes attributes and oldAttributes of this record.

Note: Subclasses have to include $this->getAttributes() and $this->getOldAttributes() in the serialized array.

public string serialize ( )
unserialize() public method

Unserializes the given string, calls the init() function and sets the attributes and oldAttributes.

Note: Subclasses have to call $this->init() if overwriting this function.

public void unserialize ( $serialized )
$serialized string