Class humhub\modules\comment\activities\NewComment
Description of NewComment
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$clickable | boolean | humhub\modules\activity\components\BaseActivity | |
$moduleId | string | The module id which this activity belongs to (required) | humhub\modules\comment\activities\NewComment |
$originator | humhub\modules\user\models\User | humhub\components\SocialActivity | |
$record | \yii\db\ActiveRecord | The related record for this activitiy | humhub\components\SocialActivity |
$recordClass | string | Record class used for instantiation. | humhub\components\SocialActivity |
$requireOriginator | boolean | Ensure originator existence | humhub\components\SocialActivity |
$requireSource | boolean | Ensure source existence | humhub\components\SocialActivity |
$source | \yii\db\ActiveRecord | humhub\components\SocialActivity | |
$viewName | string | View name used for rendering the activity | humhub\modules\comment\activities\NewComment |
$visibility | integer | humhub\modules\activity\components\BaseActivity |
Public Methods
Method | Description | Defined By |
---|---|---|
about() | Builder function for the source. | humhub\components\SocialActivity |
asArray() | Returns an array representation of this notification. | humhub\components\SocialActivity |
container() | Builder function for setting ContentContainerActiveRecord | humhub\modules\activity\components\BaseActivity |
create() | Creates an activity model and determines the contentContainer/visibility | humhub\modules\activity\components\BaseActivity |
from() | Builder function for the originator. | humhub\components\SocialActivity |
getContent() | Returns the related content instance in case the source is of type ContentOwner. | humhub\components\SocialActivity |
getContentContainer() | Determines if the activity source is related to an ContentContainer. | humhub\components\SocialActivity |
getContentInfo() | Build info text about a content | humhub\components\SocialActivity |
getContentName() | Returns the content name of $content or if not $content is provided of the notification source. | humhub\components\SocialActivity |
getContentPlainTextPreview() | humhub\components\SocialActivity | |
getContentPreview() | Returns a short preview text of the content. The max length can be defined by setting $maxLength (25 by default). | humhub\components\SocialActivity |
getDescription() | Returns the description of the activity, which is displayed on the configuration page. | humhub\modules\comment\activities\NewComment |
getSpace() | humhub\components\SocialActivity | |
getSpaceId() | humhub\components\SocialActivity | |
getTitle() | Returns the title of the activity, which is displayed on the configuration page. | humhub\modules\comment\activities\NewComment |
getUrl() | Url of the origin of this notification If source is a Content / ContentAddon / ContentContainer this will automatically generated. | humhub\components\SocialActivity |
getViewName() | humhub\components\SocialActivity | |
getViewParams() | Returns an array of view parameter, required for rendering. | humhub\components\SocialActivity |
hasContent() | Determines if this activity is related to a content. This is the case if the activitiy source is of type ContentOwner. | humhub\components\SocialActivity |
html() | humhub\components\SocialActivity | |
init() | humhub\components\SocialActivity | |
instance() | Static initializer should be prefered over new initialization, since it makes use of Yii::createObject dependency injection/configuration. | humhub\components\SocialActivity |
json() | humhub\components\SocialActivity | |
save() | Stores the activity in database | humhub\modules\activity\components\BaseActivity |
serialize() | Serializes the $source and $originator fields. | humhub\components\SocialActivity |
text() | humhub\components\SocialActivity | |
unserialize() | Unserializes the given string, calls the init() function and sets the $source and $originator fields (and $record indirectyl). | humhub\components\SocialActivity |
validate() | Validates the existence of required attributes | humhub\components\SocialActivity |
Protected Methods
Method | Description | Defined By |
---|---|---|
getContentVisibility() | Returns the visibility of the content | humhub\modules\activity\components\BaseActivity |
getOriginatorId() | Returns the user id of the originator of this activity | humhub\modules\activity\components\BaseActivity |
Property Details
The module id which this activity belongs to (required)
View name used for rendering the activity
Method Details
Returns the description of the activity, which is displayed on the configuration page.
public string getDescription ( ) | ||
return | string | The description of the activity |
---|
Returns the title of the activity, which is displayed on the configuration page.
public string getTitle ( ) | ||
return | string | The title of the activity |
---|