Class lispa\amos\partnershipprofiles\models\PartnershipProfiles
Class PartnershipProfiles This is the model class for table "partnership_profiles".
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 |
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 |
PARTNERSHIPPROFILES | 'partnershipprofiles' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIPPROFILESADMIN | 'partnershipprofilesadmin' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW | 'PartnershipProfilesWorkflow' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW_STATUS_ARCHIVED | 'PartnershipProfilesWorkflow/ARCHIVED' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW_STATUS_CLOSED | 'PartnershipProfilesWorkflow/CLOSED' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW_STATUS_DRAFT | 'PartnershipProfilesWorkflow/DRAFT' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW_STATUS_FEEDBACKRECEIVED | 'PartnershipProfilesWorkflow/FEEDBACKRECEIVED' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW_STATUS_TOVALIDATE | 'PartnershipProfilesWorkflow/TOVALIDATE' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
PARTNERSHIP_PROFILES_WORKFLOW_STATUS_VALIDATED | 'PartnershipProfilesWorkflow/VALIDATED' | lispa\amos\partnershipprofiles\models\PartnershipProfiles | |
SCENARIO_DEFAULT | 'default' | The name of the default scenario. | yii\base\Model |
SCENARIO_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record | |
SCENARIO_VIEW | 'scenario_view' | lispa\amos\partnershipprofiles\models\PartnershipProfiles |
Property Details
Category of content
List of statuses that for cwh is validated
The url to view of this model
The columns ti show as default in GridViewWidget
public void setPartnershipProfileAttachments ( $partnershipProfileAttachments )
The classname of the generic dashboard widget to access the plugin
Date end of publication
Date begin of publication
The url to view a single model
Method Details
public void attributeLabels ( ) |
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 string calculateExpiryDate ( ) |
This method verify if it's possible to make an expression of interest on this partnership profile.
public boolean expressionOfInterestAllowed ( $allowedPartnershipProfileIds = null ) | ||
$allowedPartnershipProfileIds | integer[]|null |
public yii\db\ActiveQuery getCategory ( ) | ||
return | yii\db\ActiveQuery | Category of content |
---|
The community created by the context model (community related to project-management, events or a community itself)
public lispa\amos\community\models\Community getCommunityModel ( ) |
public array getCwhValidationStatuses ( ) | ||
return | array | List of statuses that for cwh is validated |
---|
public void getDescription ( $truncate ) | ||
$truncate |
public void getDraftStatus ( ) |
This method return the expired date.
public string getExpiredDate ( ) | ||
throws | yii\base\InvalidConfigException |
---|
public void getExpressionsOfInterestStatesCounter ( ) |
public string getFullViewUrl ( ) | ||
return | string | The url to view of this model |
---|
public lispa\amos\partnershipprofiles\i18n\grammar\PartnershipProfilesGrammar getGrammar ( ) |
public array getGridViewColumns ( ) | ||
return | array | The columns ti show as default in GridViewWidget |
---|
Getter for $this->partnershipProfileAttachments;
public array|null|yii\db\ActiveRecord getPartnershipProfileAttachments ( ) |
This method return a string with all the partnership profile types concatenated with commas.
Useful in grid view or similar places.
public string getPartnershipProfileTypesString ( ) |
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 |
---|
Return the publicated at property label
public string getPublicatedAtLabel ( ) |
public \lispa\amos\core\interfaces\DateTime getPublicatedFrom ( ) | ||
return | \lispa\amos\core\interfaces\DateTime | Date begin of publication |
---|
Return the publicated from property label
public string getPublicatedFromLabel ( ) |
public void getShortDescription ( ) |
public void getTitle ( ) |
public void getToValidateStatus ( ) |
Return the translated status label
public string getTranslatedStatus ( ) |
public void getValidatedStatus ( ) |
public void getValidatorRole ( ) |
For this entity the validation logic is different from lispa\amos\core\record\Record The facilitator is linked to this "partnership profile"
public array getValidatorUsersId ( ) |
public string getViewUrl ( ) | ||
return | string | The url to view a single model |
---|
public void init ( ) |
This method checks if this partnership profile is expired.
It uses the calculated expiry date and the actual date to do the check.
public boolean isExpired ( ) |
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 setPartnershipProfileAttachments ( $partnershipProfileAttachments ) | ||
$partnershipProfileAttachments |
public boolean validateFacilitator ( $attribute, $params, $validator ) | ||
$attribute | ||
$params | ||
$validator |