1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 17:36:38 +02:00

Define static properties on SerializeAction subclasses

Explained in d1e7453ffd.

If we ever come up with a better way of doing this it should be easy to
change over, since modification of these properties by extensions is
abstracted by an Extend API.
This commit is contained in:
Toby Zerner
2015-06-18 12:24:18 +09:30
parent 574815c086
commit 4792a47265
19 changed files with 498 additions and 138 deletions

View File

@@ -14,12 +14,40 @@ class UpdateAction extends SerializeResourceAction
protected $bus;
/**
* The name of the serializer class to output results with.
*
* @var string
* @inheritdoc
*/
public static $serializer = 'Flarum\Api\Serializers\PostSerializer';
/**
* @inheritdoc
*/
public static $include = [];
/**
* @inheritdoc
*/
public static $link = [];
/**
* @inheritdoc
*/
public static $limitMax = 50;
/**
* @inheritdoc
*/
public static $limit = 20;
/**
* @inheritdoc
*/
public static $sortFields = [];
/**
* @inheritdoc
*/
public static $sort;
/**
* Instantiate the action.
*