mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Merge pull request #4624 from humhub/fix/legacyStreamTraitDoc
Fix/legacy stream trait doc
This commit is contained in:
commit
fa9cbcf6f1
@ -194,12 +194,12 @@ trait LegacyStreamTrait
|
||||
$this->setupFilters();
|
||||
}
|
||||
/**
|
||||
* @deprecated since 1.7 use afterStreamQueryBuild
|
||||
* @deprecated since 1.7 use Stream::beforeApplyFilters()
|
||||
*/
|
||||
public function setupCriteria(){}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.7 use afterStreamQueryBuild
|
||||
* @deprecated since 1.7 use Stream::beforeApplyFilters()
|
||||
*/
|
||||
public function setupFilters(){ }
|
||||
|
||||
|
@ -245,6 +245,17 @@ abstract class Stream extends Action
|
||||
* At this point the StreamQuery has already been loaded with request data.
|
||||
* Subclasses may overwrite this function in order to do some last settings on the StreamQuery instance.
|
||||
*
|
||||
* When overriding this method, make sure you call the parent implementation like the following:
|
||||
*
|
||||
* ```php
|
||||
* public function beforeApplyFilters()
|
||||
* {
|
||||
* // Add some filters here
|
||||
*
|
||||
* parent::beforeApplyFilters();
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* When overriding this method, make sure you call the parent implementation at the beginning of your function.
|
||||
* @throws \yii\base\InvalidConfigException
|
||||
*/
|
||||
@ -277,6 +288,17 @@ abstract class Stream extends Action
|
||||
* most StreamQuery settings as filters won't have any effect. Since the query is not yet executed the
|
||||
* StreamQuery->query() can still be used for custom query conditions.
|
||||
*
|
||||
* When overriding this method, make sure you call the parent implementation like the following:
|
||||
*
|
||||
* ```php
|
||||
* public function afterApplyFilters()
|
||||
* {
|
||||
* // Manipulate query...
|
||||
*
|
||||
* parent::afterApplyFilters();
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* When overriding this method, make sure you call the parent implementation at the beginning of your function.
|
||||
*/
|
||||
protected function afterApplyFilters()
|
||||
|
Loading…
x
Reference in New Issue
Block a user