Class lispa\amos\organizzazioni\models\Profilo
Class Profilo This is the model class for table "profilo".
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 |
---|---|---|---|
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_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record |
Property Details
Category of content
List of statuses that for cwh is validated
The name that correspond to 'draft' status for the content model
The columns ti show as default in GridViewWidget
The classname of the generic dashboard widget to access the plugin
The model title field value
The name that correspond to 'to validate' status for the content model
The name that correspond to 'published' status for the content model
The name of model validator role
The url to view a single model
Method Details
Override Required for cache
The default implementation will trigger an EVENT_AFTER_INSERT event when $insert
is true
,
or an EVENT_AFTER_UPDATE event if $insert
is false
. The event class used is \lispa\amos\organizzazioni\models\AfterSaveEvent.
When overriding this method, make sure you call the parent implementation so that
the event is triggered.
public void afterSave ( $insert, $changedAttributes ) | ||
$insert | boolean | Whether this method called while inserting a record.
If |
$changedAttributes | array | The old values of attributes that had changed and were saved.
You can use this parameter to take action based on the changes made for example send an email
when the password had changed or implement audit trail that tracks all the changes.
Note that no automatic type conversion performed by default. You may use yii\behaviors\AttributeTypecastBehavior to facilitate attribute typecasting. See http://www.yiiframework.com/doc-2.0/guide-db-active-record.html#attributes-typecasting. |
Returns the attribute hints.
Attribute hints are mainly used for display purpose. For example, given an attribute
isPublic
, we can declare a hint Whether the post should be visible for not logged in users
,
which provides user-friendly description of the attribute meaning and can be displayed to end users.
Unlike label hint will not be generated, if its explicit declaration is omitted.
Note, in order to inherit hints defined in the parent class, a child class needs to
merge the parent hints with child hints using functions such as array_merge()
.
public array attributeHints ( ) | ||
return | array | Attribute hints (name => hint) |
---|
public void attributeLabels ( ) |
public void behaviors ( ) |
Verifica la validità del codice fiscale (numerico) o della partita iva
public void checkPartitaIva ( $attribute, $params ) | ||
$attribute | string | |
$params | array |
public string getAddressField ( ) |
public array getAddressFieldAsArray ( ) |
public string getAddressFieldSedeLegale ( ) |
public array getAddressFieldSedeLegaleAsArray ( ) |
Returns the address in string format
public string getAddressString ( $field_name ) | ||
$field_name |
public void getAllegati ( ) |
Returns the text hint for the specified attribute.
See also attributeHints().
public string getAttributeHint ( $attribute ) | ||
$attribute | string | The attribute name |
return | string | The attribute hint |
---|
public yii\db\ActiveQuery getCategory ( ) | ||
return | yii\db\ActiveQuery | Category of content |
---|
Get Id of configuration record for network model Profilo
public static integer getCwhConfigId ( ) | ||
return | integer | $cwhConfigId |
---|
public array getCwhValidationStatuses ( ) | ||
return | array | List of statuses that for cwh is validated |
---|
public string getDescription ( $truncate ) | ||
$truncate | ||
return | string | The model description field value |
---|
public string getDraftStatus ( ) | ||
return | string | The name that correspond to 'draft' status for the content model |
---|
public static array getEditFields ( ) |
public mixed getGrammar ( ) |
public array getGridViewColumns ( ) | ||
return | array | The columns ti show as default in GridViewWidget |
---|
Return classname of the MM table connecting user and network
public string getMmClassName ( ) |
Get the name of field that contains user id in network-users association table
public string getMmNetworkIdFieldName ( ) |
Get the name of the table storing network-users associations
public string getMmTableName ( ) |
Get the name of field that contains network id in network-users association table
public string getMmUserIdFieldName ( ) |
public void getModelImage ( ) |
public void getNameField ( ) |
public string getPluginWidgetClassname ( ) | ||
return | string | The classname of the generic dashboard widget to access the plugin |
---|
public yii\db\ActiveQuery getSedeIndirizzo ( ) |
public yii\db\ActiveQuery getSedeLegaleIndirizzo ( ) |
public void getShortDescription ( ) |
public string getTitle ( ) | ||
return | string | The model title field value |
---|
public string getToValidateStatus ( ) | ||
return | string | The name that correspond to 'to validate' status for the content model |
---|
Get the user id used in network-users association table
public integer getUserId ( ) |
public mixed getUserNetworkWidget ( $userId = null, $isUpdate = false ) | ||
$userId | null | |
$isUpdate | boolean |
public string getValidatedStatus ( ) | ||
return | string | The name that correspond to 'published' status for the content model |
---|
public string getValidatorRole ( ) | ||
return | string | The name of model validator role |
---|
public string getViewUrl ( ) | ||
return | string | The url to view a single model |
---|
public void init ( ) |
Return true if the user with id $userId belong to the network with id $networkId; if $userId is null the logged User id is considered
public boolean isNetworkUser ( $networkId, $userId = null ) | ||
$networkId | integer | |
$userId | integer |
Return true if the network is validated or no validation process is implemented for the network.
if $networkId is null, current network (this) is condidered
public boolean isValidated ( $networkId = null ) | ||
$networkId | integer |
public void organizationsBeforeValidate ( ) |
public void representingColumn ( ) |
public void rules ( ) |
public void setAllegati ( $allegati ) | ||
$allegati |