Class lispa\amos\discussioni\models\DiscussioniTopic
This is the model class for table "discussioni_topic".
Public Properties
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$adminInstalled | lispa\amos\core\record\Record | ||
$isNewsFiledName | string | lispa\amos\notificationmanager\record\NotifyRecord |
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
__shortText() | Parse string and return limited one | lispa\amos\core\record\Record |
createRelationQuery() | Creates a query instance for has-one or has-many relation. |
yii\db\BaseActiveRecord |
deleteInternal() | Deletes an ActiveRecord without considering transaction. | yii\db\ActiveRecord |
findByCondition() | Finds ActiveRecord instance(s) by the given condition. | yii\db\ActiveRecord |
getLatitude() | lispa\amos\discussioni\models\DiscussioniTopic | |
getLongitude() | lispa\amos\discussioni\models\DiscussioniTopic | |
insertInternal() | Inserts an ActiveRecord into DB without considering transaction. | yii\db\ActiveRecord |
resolveFields() | Determines which fields can be returned by toArray(). | yii\base\ArrayableTrait |
switchOffNotifications() | Switch off notifications | lispa\amos\notificationmanager\record\NotifyRecord |
updateInternal() | yii\db\BaseActiveRecord |
Events
Event | Type | Description | Defined By |
---|---|---|---|
EVENT_AFTER_DELETE | yii\base\Event | An event that is triggered after a record is deleted. | yii\db\BaseActiveRecord |
EVENT_AFTER_FIND | yii\base\Event | An event that is triggered after the record is created and populated with query result. | yii\db\BaseActiveRecord |
EVENT_AFTER_INSERT | yii\db\AfterSaveEvent | An event that is triggered after a record is inserted. | yii\db\BaseActiveRecord |
EVENT_AFTER_REFRESH | yii\base\Event | An event that is triggered after a record is refreshed. (available since version 2.0.8) | yii\db\BaseActiveRecord |
EVENT_AFTER_UPDATE | yii\db\AfterSaveEvent | An event that is triggered after a record is updated. | yii\db\BaseActiveRecord |
EVENT_AFTER_VALIDATE | yii\base\Event | An event raised at the end of validate() | yii\base\Model |
EVENT_BEFORE_DELETE | yii\base\ModelEvent | An event that is triggered before deleting a record. | yii\db\BaseActiveRecord |
EVENT_BEFORE_INSERT | yii\base\ModelEvent | An event that is triggered before inserting a record. | yii\db\BaseActiveRecord |
EVENT_BEFORE_UPDATE | yii\base\ModelEvent | An event that is triggered before updating a record. | yii\db\BaseActiveRecord |
EVENT_BEFORE_VALIDATE | yii\base\ModelEvent | An event raised at the beginning of validate(). | yii\base\Model |
EVENT_INIT | yii\base\Event | An event that is triggered when the record is initialized via init(). | yii\db\BaseActiveRecord |
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
DISCUSSIONI_WORKFLOW | 'DiscussioniTopicWorkflow' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_ATTIVA | 'DiscussioniTopicWorkflow/ATTIVA' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_BOZZA | 'DiscussioniTopicWorkflow/BOZZA' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_DAVALIDARE | 'DiscussioniTopicWorkflow/DAVALIDARE' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_DISATTIVA | 'DiscussioniTopicWorkflow/DISATTIVA' | lispa\amos\discussioni\models\DiscussioniTopic | |
OP_ALL | 7 | All three operations: insert, update, delete. This is a shortcut of the expression: OP_INSERT | OP_UPDATE | OP_DELETE. | yii\db\ActiveRecord |
OP_DELETE | 4 | The delete operation. This is mainly used when overriding transactions() to specify which operations are transactional. | yii\db\ActiveRecord |
OP_INSERT | 1 | The insert operation. This is mainly used when overriding transactions() to specify which operations are transactional. | yii\db\ActiveRecord |
OP_UPDATE | 2 | The update operation. This is mainly used when overriding transactions() to specify which operations are transactional. | yii\db\ActiveRecord |
SCENARIO_DEFAULT | 'default' | The name of the default scenario. | yii\base\Model |
SCENARIO_DETAILS | 'scenario_details' | lispa\amos\discussioni\models\DiscussioniTopic | |
SCENARIO_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record | |
SCENARIO_INTRODUCTION | 'scenario_introduction' | All the scenarios listed below are for the wizard. | lispa\amos\discussioni\models\DiscussioniTopic |
SCENARIO_PUBLICATION | 'scenario_publication' | lispa\amos\discussioni\models\DiscussioniTopic | |
SCENARIO_SUMMARY | 'scenario_summary' | lispa\amos\discussioni\models\DiscussioniTopic |
Property Details
Category of content
List of statuses that for cwh is validated
Destinatari
Destinatari notifiche
Destinatari pubblicazione
public void setDiscussionsAttachmentsForItemView ( $attachments )
The url to view of this model
The columns ti show as default in GridViewWidget
Date end of publication
Date begin of publication
Regola di pubblicazione
Validatori
The url to view a single model
Method Details
This method is called when the AR object is created and populated with the query result.
The default implementation will trigger an EVENT_AFTER_FIND event. When overriding this method, make sure you call the parent implementation to ensure the event is triggered.
public void afterFind ( ) |
public void attributeLabels ( ) |
public array avatarsUtenti ( ) |
Override for demos
The default implementation will trigger an EVENT_BEFORE_INSERT event when $insert
is true
,
or an EVENT_BEFORE_UPDATE event if $insert
is false
.
When overriding this method, make sure you call the parent implementation like the following:
public function beforeSave($insert)
{
if (!parent::beforeSave($insert)) {
return false;
}
// ...custom code here...
return true;
}
public boolean beforeSave ( $insert ) | ||
$insert | boolean | Whether this method called while inserting a record.
If |
return | boolean | Whether the insertion or updating should continue.
If |
---|
public void behaviors ( ) |
public array commentsUsersAvatars ( ) |
public yii\db\ActiveQuery getCategory ( ) | ||
return | yii\db\ActiveQuery | Category of content |
---|
public yii\db\ActiveQuery getCommentCreatorUser ( lispa\amos\comments\models\Comment $comment ) | ||
$comment | lispa\amos\comments\models\Comment |
public null|yii\db\ActiveQuery getCreatoreDiscussione ( ) |
public array getCwhValidationStatuses ( ) | ||
return | array | List of statuses that for cwh is validated |
---|
public mixed getDataUltimaRisposta ( ) |
public string getDescription ( $truncate ) | ||
$truncate |
Getter for $this->attachments;
public void getDiscussionsAttachments ( ) |
public void getDiscussionsAttachmentsForItemView ( ) |
Getter for $this->discussionsTopicImage;
public void getDiscussionsTopicImage ( ) |
public string getDiscussionsTopicImageUrl ( $size = 'original', $protected = true, $url = '/img/img_default.jpg', $absolute = false, $canCache = false ) | ||
$size | string | |
$protected | boolean | |
$url | string | |
$absolute | boolean | |
$canCache | boolean |
public void getDraftStatus ( ) |
public string getFullViewUrl ( ) | ||
return | string | The url to view of this model |
---|
public mixed getGrammar ( ) |
public array getGridViewColumns ( ) | ||
return | array | The columns ti show as default in GridViewWidget |
---|
public yii\db\ActiveQuery getLastComment ( ) |
public mixed getLastCommentDate ( ) |
public yii\db\ActiveQuery getLastCommentUser ( ) |
public yii\db\ActiveQuery getLastComments ( ) |
protected mixed getLatitude ( ) |
protected mixed getLongitude ( ) |
public void getModelImage ( ) |
This method is the getter for the model image url and web url.
public string getModelImageUrl ( $size = 'original', $protected = true, $url = '/img/img_default.jpg', $absolute = false, $canCache = false ) | ||
$size | string | |
$protected | boolean | |
$url | string | |
$absolute | boolean | |
$canCache | boolean |
public void getPluginWidgetClassname ( ) |
public string getPublicatedAt ( ) | ||
return | string | Date end of publication |
---|
public string getPublicatedFrom ( ) | ||
return | string | Date begin of publication |
---|
public void getShortDescription ( ) |
public array getStatsToolbar ( $disableLink = false ) | ||
$disableLink |
public array getStatusToRenderToHide ( ) |
public string getTitle ( ) |
public void getToValidateStatus ( ) |
public yii\db\ActiveQuery getUltimaRisposta ( ) |
public yii\db\ActiveQuery getUltimeRisposte ( ) |
public yii\db\ActiveQuery getUtenteRisposta ( lispa\amos\discussioni\models\DiscussioniRisposte $risposta ) | ||
$risposta | lispa\amos\discussioni\models\DiscussioniRisposte |
public yii\db\ActiveQuery getUtenteUltimaRisposta ( ) |
public void getValidatedStatus ( ) |
public void getValidatorRole ( ) |
public string getViewUrl ( ) | ||
return | string | The url to view a single model |
---|
public void init ( ) |
public boolean isCommentable ( ) |
public void representingColumn ( ) |
See also yii\base\Model::rules() for more info.
public void rules ( ) |
Returns a list of scenarios and the corresponding active attributes.
An active attribute is one that is subject to validation in the current scenario. The returned array should be in the following format:
[
'scenario1' => ['attribute11', 'attribute12', ...],
'scenario2' => ['attribute21', 'attribute22', ...],
...
]
By default, an active attribute is considered safe and can be massively assigned.
If an attribute should NOT be massively assigned (thus considered unsafe),
please prefix the attribute with an exclamation character (e.g. '!rank'
).
The default implementation of this method will return all scenarios found in the rules() declaration. A special scenario named SCENARIO_DEFAULT will contain all attributes found in the rules(). Each scenario will be associated with the attributes that are being validated by the validation rules that apply to the scenario.
public array scenarios ( ) | ||
return | array | A list of scenarios and the corresponding active attributes. |
---|
public void setDiscussionsAttachments ( $attachments ) | ||
$attachments |
public void setDiscussionsAttachmentsForItemView ( $attachments ) | ||
$attachments |
public void setDiscussionsTopicImage ( $image ) | ||
$image |