Class lispa\amos\discussioni\models\search\DiscussioniTopicSearch
Class DiscussioniTopicSearch
DiscussioniTopicSearch represents the model behind the search form about lispa\amos\discussioni\models\DiscussioniTopic
.
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 |
getLatitude() | lispa\amos\discussioni\models\DiscussioniTopic | |
getLongitude() | lispa\amos\discussioni\models\DiscussioniTopic | |
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 |
---|---|---|---|
DISCUSSIONI_WORKFLOW | 'DiscussioniTopicWorkflow' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_ATTIVA | 'DiscussioniTopicWorkflow/ATTIVA' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_BOZZA | 'DiscussioniTopicWorkflow/BOZZA' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_DAVALIDARE | 'DiscussioniTopicWorkflow/DAVALIDARE' | lispa\amos\discussioni\models\DiscussioniTopic | |
DISCUSSIONI_WORKFLOW_STATUS_DISATTIVA | 'DiscussioniTopicWorkflow/DISATTIVA' | lispa\amos\discussioni\models\DiscussioniTopic | |
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_DETAILS | 'scenario_details' | lispa\amos\discussioni\models\DiscussioniTopic | |
SCENARIO_FAKE_REQUIRED | 'scenario_fake_required' | lispa\amos\core\record\Record | |
SCENARIO_INTRODUCTION | 'scenario_introduction' | All the scenarios listed below are for the wizard. | lispa\amos\discussioni\models\DiscussioniTopic |
SCENARIO_PUBLICATION | 'scenario_publication' | lispa\amos\discussioni\models\DiscussioniTopic | |
SCENARIO_SUMMARY | 'scenario_summary' | lispa\amos\discussioni\models\DiscussioniTopic |
Property Details
public void setNotifier ( lispa\amos\notificationmanager\base\NotifyWidget $notifier )
Method Details
public void __construct ( array $config = [] ) | ||
$config |
public yii\db\ActiveQuery baseSearch ( $params ) | ||
$params |
public void behaviors ( ) |
public yii\db\ActiveQuery buildQuery ( $queryType, $params ) | ||
$queryType | string | |
$params | array | |
return | yii\db\ActiveQuery | $query |
---|
public boolean cmsIsVisible ( $id ) | ||
$id | \lispa\amos\discussioni\models\search\type |
Search method useful to retrieve discussions to show in frontend (with cms)
public yii\data\ActiveDataProvider cmsSearch ( $params, $limit = null ) | ||
$params | ||
$limit | integer|null |
public void cmsSearchFields ( ) |
public void cmsViewFields ( ) |
public lispa\amos\core\record\SearchResult convertToSearchResult ( $model ) | ||
$model | object | The model to convert into SearchResult |
public yii\data\ActiveDataProvider discussioniInEvidenza ( $params, $limit = null ) | ||
$params | ||
$limit | null |
public $this getNotifier ( ) |
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. |
---|
public yii\data\ActiveDataProvider search ( $params, $queryType, $limit = null ) | ||
$params | array | |
$queryType | string | |
$limit | integer|null |
public yii\data\ActiveDataProvider searchAdminAll ( $params, $limit = null ) | ||
$params | ||
$limit | null |
Search all discussions in status validated
public yii\data\ActiveDataProvider searchAll ( $params, $limit = null ) | ||
$params | ||
$limit | null |
This method returns the ActiveQuery object that contains the query to retrieve logged user all contents.
public yii\db\ActiveQuery searchAllQuery ( $params ) | ||
$params | array |
Search discussions created by logged user
public yii\data\ActiveDataProvider searchCreatedBy ( $params, $limit = null ) | ||
$params | ||
$limit | null |
This method returns the ActiveQuery object that contains the query to retrieve created by logged user contents.
public yii\db\ActiveQuery searchCreatedByMeQuery ( $params ) | ||
$params | array |
This method define the search default order.
public yii\data\BaseDataProvider searchDefaultOrder ( $dataProvider ) | ||
$dataProvider | yii\data\BaseDataProvider |
Search discussion in status validated matching logged user parameters (based on publication rule)
public yii\data\ActiveDataProvider searchOwnInterest ( $params, $limit = null ) | ||
$params | ||
$limit | null |
This method returns the ActiveQuery object that contains the query to retrieve logged user own interest contents.
public yii\db\ActiveQuery searchOwnInterestsQuery ( $params ) | ||
$params | array |
Search discussions in 'to validate' that logged user has permission to validate
public yii\data\ActiveDataProvider searchToValidate ( $params, $limit = null ) | ||
$params | ||
$limit | integer|null |
This method returns the ActiveQuery object that contains the query to retrieve logged user to validate contents.
public yii\db\ActiveQuery searchToValidateQuery ( $params ) | ||
$params | array |
public void setNotifier ( lispa\amos\notificationmanager\base\NotifyWidget $notifier ) | ||
$notifier |
public yii\data\ActiveDataProvider ultimeDiscussioni ( $params, $limit = null ) | ||
$params | ||
$limit | null |