Class lispa\amos\documenti\models\Documenti
Class Documenti
This is the model class for table "documenti".
Public Properties
Protected Properties
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 |
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 |
---|---|---|---|
DOCUMENTI_WORKFLOW | 'DocumentiWorkflow' | lispa\amos\documenti\models\Documenti | |
DOCUMENTI_WORKFLOW_STATUS_BOZZA | 'DocumentiWorkflow/BOZZA' | lispa\amos\documenti\models\Documenti | |
DOCUMENTI_WORKFLOW_STATUS_DAVALIDARE | 'DocumentiWorkflow/DAVALIDARE' | lispa\amos\documenti\models\Documenti | |
DOCUMENTI_WORKFLOW_STATUS_NONVALIDATO | 'DocumentiWorkflow/NONVALIDATO' | lispa\amos\documenti\models\Documenti | |
DOCUMENTI_WORKFLOW_STATUS_VALIDATO | 'DocumentiWorkflow/VALIDATO' | lispa\amos\documenti\models\Documenti | |
IS_DOCUMENT | 0 | lispa\amos\documenti\models\Documenti | |
IS_FOLDER | 1 | lispa\amos\documenti\models\Documenti | |
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_CREATE | 'document_create' | Create Document scenario | lispa\amos\documenti\models\Documenti |
SCENARIO_CREATE_HIDE_PUBBLICATION_DATE | 'scenario_create_hide_pubblication_date' | lispa\amos\documenti\models\Documenti | |
SCENARIO_DEFAULT | 'default' | The name of the default scenario. | yii\base\Model |
SCENARIO_DETAILS | 'scenario_details' | lispa\amos\documenti\models\Documenti | |
SCENARIO_DETAILS_HIDE_PUBBLICATION_DATE | 'scenario_details_hide_pubblication_date' | Secenarios for hide pubblication date | lispa\amos\documenti\models\Documenti |
SCENARIO_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record | |
SCENARIO_FOLDER | 'scenario_folder' | lispa\amos\documenti\models\Documenti | |
SCENARIO_INTRODUCTION | 'scenario_introduction' | All the scenarios listed below are for the wizard. | lispa\amos\documenti\models\Documenti |
SCENARIO_PUBLICATION | 'scenario_publication' | lispa\amos\documenti\models\Documenti | |
SCENARIO_SUMMARY | 'scenario_summary' | lispa\amos\documenti\models\Documenti | |
SCENARIO_UPDATE | 'document_update' | lispa\amos\documenti\models\Documenti | |
SCENARIO_UPDATE_HIDE_PUBBLICATION_DATE | 'scenario_update_hide_pubblication_date' | lispa\amos\documenti\models\Documenti |
Property Details
Category of content
List of statuses that for cwh is validated
Destinatari
Destinatari notifiche
Destinatari pubblicazione
Distanza
public lispa\amos\attachments\models\File setDocumentAttachments ( $attachments )
public lispa\amos\attachments\models\File setDocumentMainFile ( $doc )
File
The columns ti show as default in GridViewWidget
The key to be used to search the status button label in the model workflow metadata.
The key to be used to search the status button data confirm message in the model workflow metadata.
The key to be used to search the status description in the model workflow metadata.
The key to be used to search the status label in the model workflow metadata.
The classname of the generic dashboard widget to access the plugin
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 void behaviors ( ) |
public boolean canValidate ( ) |
public boolean deleteNewDocumentVersion ( ) | ||
throws | Exception | |
---|---|---|
throws | yii\db\StaleObjectException |
public false|integer deleteThisDocumentAttachmentRows ( ) | ||
throws | Exception | |
---|---|---|
throws | yii\db\StaleObjectException |
public false|integer deleteThisDocumentMainFileRow ( ) | ||
throws | Exception | |
---|---|---|
throws | yii\db\StaleObjectException |
public boolean duplicateDocumentAttachments ( $newDocument ) | ||
$newDocument | lispa\amos\documenti\models\Documenti |
public boolean duplicateDocumentMainFile ( $newDocument ) | ||
$newDocument | lispa\amos\documenti\models\Documenti |
Search all children recursively
public array getAllChildrens ( $children = [] ) | ||
$children | array |
Search all document children recursively
public array getAllDocumentChildrens ( ) |
public lispa\amos\documenti\models\Documenti[] getAllDocumentVersions ( ) |
public array getAllParents ( ) |
public yii\db\ActiveQuery getCategory ( ) | ||
return | yii\db\ActiveQuery | Category of content |
---|
public array getCwhValidationStatuses ( ) | ||
return | array | List of statuses that for cwh is validated |
---|
public void getDescription ( $truncate ) | ||
$truncate |
This method is the getter for the document file and returns an attachment File object.
public lispa\amos\attachments\models\File getDocument ( ) |
Getter for $this->documentAttachments;
public lispa\amos\attachments\models\File[] getDocumentAttachments ( ) |
Search all document in the first level
public array getDocumentChildrens ( ) |
This method is the getter for the document image and returns an HTML ready to be rendered.
public string getDocumentImage ( $onlyIconName = false ) | ||
$onlyIconName | boolean |
Getter for $this->documentMainFile;
public lispa\amos\attachments\models\File getDocumentMainFile ( ) |
public string getDocumentMainFileUrl ( $size = 'original', $protected = true, $url = '/img/img_default.jpg', $absolute = false, $canCache = false ) | ||
$size | string | |
$protected | boolean | |
$url | string | |
$absolute | boolean | |
$canCache | boolean |
This method is the getter for the document url and web url.
public string getDocumentUrl ( $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 lispa\amos\documenti\i18n\grammar\DocumentsGrammar|mixed getGrammar ( ) |
public array getGridViewColumns ( ) | ||
return | array | The columns ti show as default in GridViewWidget |
---|
public lispa\amos\documenti\models\Documenti getLastOldDocumentVersion ( ) |
public string getMetadataButtonLabelKey ( ) | ||
return | string | The key to be used to search the status button label in the model workflow metadata. |
---|
public string getMetadataButtonMessageKey ( ) | ||
return | string | The key to be used to search the status button data confirm message in the model workflow metadata. |
---|
public string getMetadataDescriptionKey ( ) | ||
return | string | The key to be used to search the status description in the model workflow metadata. |
---|
public string getMetadataLabelKey ( ) | ||
return | string | The key to be used to search the status label in the model workflow metadata. |
---|
This method is the getter for the model image and returns an attachment File object.
public lispa\amos\attachments\models\File 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 integer getNextVersion ( ) |
public string getPluginWidgetClassname ( ) | ||
return | string | The classname of the generic dashboard widget to access the plugin |
---|
public \lispa\amos\core\interfaces\DateTime getPublicatedAt ( ) | ||
return | \lispa\amos\core\interfaces\DateTime | Date end of publication |
---|
public \lispa\amos\core\interfaces\DateTime getPublicatedFrom ( ) | ||
return | \lispa\amos\core\interfaces\DateTime | Date begin of publication |
---|
public void getShortDescription ( ) |
public void getStatsToolbar ( $disableLink = false ) | ||
$disableLink |
public array getStatusToRenderToHide ( ) |
public void getTitle ( ) |
public void getToValidateStatus ( ) |
public void getValidatedStatus ( ) |
public void getValidatorRole ( ) |
public string getVersionInfo ( ) | ||
throws | yii\base\InvalidConfigException |
---|
public string getViewUrl ( ) | ||
return | string | The url to view a single model |
---|
public void init ( ) |
In this method must be defined the conditions that say if the model is commentable and then return true or false.
public boolean isCommentable ( ) |
public boolean makeNewDocumentVersion ( ) |
public void representingColumn ( ) |
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 setDetailScenario ( ) |
public lispa\amos\attachments\models\File setDocumentAttachments ( $attachments ) | ||
$attachments |
public lispa\amos\attachments\models\File setDocumentMainFile ( $doc ) | ||
$doc | lispa\amos\attachments\models\File |