Class lispa\amos\projectmanagement\models\Projects
This is the model class for table "projects".
Public Properties
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$adminInstalled | lispa\amos\core\record\Record |
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 |
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 |
---|---|---|---|
COMMUNITY_MANAGER_ROLE_NAME | 'Project Manager' | lispa\amos\projectmanagement\models\Projects | |
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 |
PROJECTS_WORKFLOW | 'ProjectsWorkflow' | lispa\amos\projectmanagement\models\Projects | |
PROJECTS_WORKFLOW_STATUS_CLOSED | 'ProjectsWorkflow/CLOSED' | lispa\amos\projectmanagement\models\Projects | |
PROJECTS_WORKFLOW_STATUS_ONEDIT | 'ProjectsWorkflow/ONEDIT' | lispa\amos\projectmanagement\models\Projects | |
PROJECTS_WORKFLOW_STATUS_STARTUP | 'ProjectsWorkflow/STARTUP' | lispa\amos\projectmanagement\models\Projects | |
PROJECTS_WORKFLOW_STATUS_VALIDATED | 'ProjectsWorkflow/VALIDATED' | lispa\amos\projectmanagement\models\Projects | |
ROLE_PARTICIPANT | 'PARTICIPANT' | lispa\amos\projectmanagement\models\Projects | |
ROLE_PARTNER_REFERENT | 'PARTNER_REFERENT' | lispa\amos\projectmanagement\models\Projects | |
ROLE_PROJECT_MANAGER | 'PROJECT_MANAGER' | lispa\amos\projectmanagement\models\Projects | |
SCENARIO_CREATE_SAVE | 'create_save_without_wizard' | lispa\amos\projectmanagement\models\Projects | |
SCENARIO_DEFAULT | 'default' | The name of the default scenario. | yii\base\Model |
SCENARIO_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record | |
SESSION_UPDATE_REFERER | 'projects_update_referer' | lispa\amos\projectmanagement\models\Projects |
Property Details
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 afterSave ( $insert, $changedAttributes ) | ||
$insert | boolean | |
$changedAttributes | array | |
throws | Exception |
---|
public boolean beforeSave ( $insert ) | ||
$insert | ||
throws | yii\base\Exception |
---|
public void beforeValidate ( ) |
Adding the file behavior
public void behaviors ( ) |
public boolean canStartProject ( ) |
public void getActiveCommunityMembers ( ) |
public void getActivitiesReferentUserIds ( ) |
public void getAdditionalAssociationTargetQuery ( $communityId ) | ||
$communityId |
public static void getAllResponsiblesUsersWorkPaln ( $projectId ) | ||
$projectId |
public void getAssociationTargetQuery ( $communityId ) | ||
$communityId |
The name of the basic member role
public string getBaseRole ( ) |
public lispa\amos\community\models\Community|null getCommunityFromScope ( ) | ||
throws | yii\base\Exception |
---|
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 yii\db\ActiveQuery getCommunityUserMm ( ) |
Array containing the possible roles of a community Member
public array getContextRoles ( ) |
public array|null|lispa\amos\projectmanagement\models\ProjectsTasksCosts getCostRow ( $costItemId, $organizationId ) | ||
$costItemId | ||
$organizationId |
public yii\db\ActiveQuery getCosts ( ) |
public mixed getFullViewUrl ( ) |
public mixed getGrammar ( ) |
public static array getItemsWorkPlanArray ( $projectId, $checkOwner = false, $taskInSelection = [] ) | ||
$projectId | ||
$checkOwner | ||
$taskInSelection |
public void getLogo ( ) |
The name of the greatest role a member can have
public string getManagerRole ( ) |
Array containing the next level for a given initial role
public string getNextRole ( $role ) | ||
$role | string |
public void getNumberAllOrganizations ( ) |
For m2m widget actions: return the plugin controller name to construct redirect URL
public string getPluginController ( ) |
public void getPluginModel ( ) |
For m2m widget actions: return the plugin module name to construct redirect URL
public string getPluginModule ( ) |
public string getPluginWidgetClassname ( ) |
public static string getPmRole ( $role ) | ||
$role |
public void getProjectAllResponsiblesUsersWorkPaln ( ) |
public void getProjectItemsWorkPlanArray ( ) |
public void getProjectManagerIds ( ) |
public lispa\amos\core\interfaces\OrganizationsModelInterface[] getProjectOrganizations ( ) |
public void getProjectTasks ( ) |
Retrieve community role of the user identified by user id param.
public string getRawCommunityRoleByUserId ( $userId ) | ||
$userId | integer | |
throws | Exception |
---|
For m2m widget actions: return the controller action name to construct redirect URL
public string getRedirectAction ( ) |
Array containing user permission for a given role
public array getRolePermissions ( $role ) | ||
$role | string |
public string getViewUrl ( ) | ||
return | string | The url to view a single model |
---|
This method return the correct workflow status label. It checks if the workflow behavior is present, then checks if the model has a workflow status and return the correct label.
public string getWorkflowStatusLabel ( ) |
public void hasCustomSpendingVoices ( ) |
public boolean hasLinkedCosts ( $customSpendingVoicesId ) | ||
$customSpendingVoicesId | integer |
public boolean hasTasks ( ) |
public void init ( ) |
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 validateDates ( ) |