Class humhub\modules\content\models\ContentDeprecated

Inheritancehumhub\modules\content\models\ContentDeprecated » humhub\components\ActiveRecord » yii\db\ActiveRecord
ImplementsSerializable
Subclasseshumhub\modules\content\models\Content
Available since version1.2

ContentDeprecated is a compatiblity layer for the Content model which ensures support for older HumHub versions.

Note the methods in this class will be removed in future releases!

Public Methods

Hide inherited methods

MethodDescriptionDefined By
beforeSave() humhub\components\ActiveRecord
canDelete() Checks if the content can be deleted Note: Use canEdit method instead. humhub\modules\content\models\ContentDeprecated
canRead() Checks if this content can readed Note: use canView method instead humhub\modules\content\models\ContentDeprecated
canWrite() Checks if this content can be changed Note: use canEdit method instead humhub\modules\content\models\ContentDeprecated
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
getSpace() Return space (if this content assigned to a space) Note: Use container attribute instead humhub\modules\content\models\ContentDeprecated
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() User which created this Content Note: Use createdBy attribute instead. humhub\modules\content\models\ContentDeprecated
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

canDelete() public method
Deprecated since version 1.1

Checks if the content can be deleted Note: Use canEdit method instead.

public void canDelete ( $userId "" )
$userId integer

Optional user id (if empty current user id will be used)

canRead() public method
Deprecated since version 1.1

Checks if this content can readed Note: use canView method instead

public boolean canRead ( $userId "" )
$userId integer
canWrite() public method
Deprecated since version 1.1

Checks if this content can be changed Note: use canEdit method instead

public boolean canWrite ( $userId "" )
$userId integer
getSpace() public method
Deprecated since version 1.1

Return space (if this content assigned to a space) Note: Use container attribute instead

public \yii\db\ActiveQuery getSpace ( )
getUser() public method
Deprecated since version 1.1

User which created this Content Note: Use createdBy attribute instead.

public \yii\db\ActiveQuery getUser ( )