Class lispa\amos\admin\models\search\UserProfileSearch
Class UserProfileSearch
UserProfileSearch represents the model behind the search form about common\models\UserProfile
.
Public Properties
Protected Properties
Public Methods
Protected Methods
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 |
---|---|---|---|
BOOLEAN_FIELDS_VALUE_NO | 0 | lispa\amos\admin\models\base\UserProfile | |
BOOLEAN_FIELDS_VALUE_YES | 1 | lispa\amos\admin\models\base\UserProfile | |
EVENT_AGGIORNA_RUOLO | 'aggiorna-ruolo' | lispa\amos\admin\models\UserProfile | |
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_NEW_ACCOUNT | 'scenario_create_new_account' | Scenario used to create new account for social login. | lispa\amos\admin\models\base\UserProfile |
SCENARIO_DEFAULT | 'default' | The name of the default scenario. | yii\base\Model |
SCENARIO_DYNAMIC | 'scenario_dynamic' | Dynamic scenario for form | lispa\amos\admin\models\base\UserProfile |
SCENARIO_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record | |
SCENARIO_INTERESTS | 'scenario_interests' | lispa\amos\admin\models\base\UserProfile | |
SCENARIO_INTRODUCING_MYSELF | 'scenario_introducing_myself' | lispa\amos\admin\models\base\UserProfile | |
SCENARIO_INTRODUCTION | 'scenario_introduction' | All the scenarios listed below are for the wizard. | lispa\amos\admin\models\base\UserProfile |
SCENARIO_PARTNERSHIP | 'scenario_partnership' | lispa\amos\admin\models\base\UserProfile | |
SCENARIO_REACTIVATE_DEACTIVATE_USER | 'scenario_reactivate_deactivate_user' | Scenario used in user reactivate and deactivate action. | lispa\amos\admin\models\base\UserProfile |
SCENARIO_ROLE_AND_AREA | 'scenario_role_and_area' | lispa\amos\admin\models\base\UserProfile | |
SCENARIO_SUMMARY | 'scenario_summary' | lispa\amos\admin\models\base\UserProfile | |
STATUS_ACTIVE | 1 | Activated user profile value | lispa\amos\admin\models\base\UserProfile |
STATUS_DEACTIVATED | 0 | Deactivated user profile value | lispa\amos\admin\models\base\UserProfile |
USERPROFILE_WORKFLOW | 'UserProfileWorkflow' | lispa\amos\admin\models\base\UserProfile | |
USERPROFILE_WORKFLOW_STATUS_DRAFT | 'UserProfileWorkflow/DRAFT' | lispa\amos\admin\models\base\UserProfile | |
USERPROFILE_WORKFLOW_STATUS_NOTVALIDATED | 'UserProfileWorkflow/NOTVALIDATED' | lispa\amos\admin\models\base\UserProfile | |
USERPROFILE_WORKFLOW_STATUS_TOVALIDATE | 'UserProfileWorkflow/TOVALIDATE' | lispa\amos\admin\models\base\UserProfile | |
USERPROFILE_WORKFLOW_STATUS_VALIDATED | 'UserProfileWorkflow/VALIDATED' | lispa\amos\admin\models\base\UserProfile |
Property Details
Method Details
public void attributeLabels ( ) |
public mixed baseFilter ( $query ) | ||
$query | yii\db\ActiveQuery |
This is the base search.
public yii\db\ActiveQuery baseSearch ( $params ) | ||
$params | array |
public lispa\amos\core\record\SearchResult convertToSearchResult ( $model ) | ||
$model | object | The model to convert into SearchResult |
This method count
public integer getNewProfilesCount ( ) |
Search all validated documents
public yii\data\ActiveDataProvider globalSearch ( $searchParamsArray, $pageSize = 5 ) | ||
$searchParamsArray | array | Array of search words |
$pageSize | integer|null |
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. |
---|
Search all active users.
public yii\data\ActiveDataProvider search ( $params ) | ||
$params | array |
Search all active users that are a community manager for at least one community.
public yii\data\ActiveDataProvider searchCommunityManagerUsers ( $params ) | ||
$params | array |
Search all active users with "FACILITATOR" role.
public yii\data\ActiveDataProvider searchFacilitatorUsers ( $params ) | ||
$params | array |
Search all inactive users.
public yii\data\ActiveDataProvider searchInactiveUsers ( $params ) | ||
$params | array |
Search all active users that was validated at least once.
public yii\data\ActiveDataProvider searchOnceValidatedUsers ( $params ) | ||
$params | array |
protected void setUserProfileSort ( $dataProvider ) | ||
$dataProvider | yii\data\ActiveDataProvider |
This method add a query for a field that filter by a role
protected void userProfileRolesQuery ( $query, $fieldName, $role ) | ||
$query | yii\db\ActiveQuery | |
$fieldName | string | |
$role |
protected void userProfileSelectFieldsQuery ( $query, $fieldName ) | ||
$query | yii\db\ActiveQuery | |
$fieldName | string |