|
ILIAS
trunk Revision v12.0_alpha-413-g215742c0453
|
News Context DTO represents a context where news items can be associated with. More...
Collaboration diagram for ILIAS\News\Data\NewsContext:Public Member Functions | |
| __construct (private readonly int $ref_id, private ?int $obj_id=null, private ?string $obj_type=null, private ?int $parent_ref_id=null, private int $level=0,) | |
| getRefId () | |
| getObjId () | |
| getObjType () | |
| getParentRefId () | |
| setObjId (int $obj_id) | |
| setObjType (string $obj_type) | |
| setParentRefId (?int $parent_ref_id) | |
| setLevel (int $level) | |
| getLevel () | |
| isChildOf (NewsContext $parent_context) | |
| Check if this context is a child of another context. More... | |
| isParentOf (NewsContext $child_context) | |
| Check if this context is a parent of another context. More... | |
| isRoot () | |
| Check if this context is at the root level. More... | |
| normalize () | |
| Transform this object into array representation and keep only properties which are not default values. More... | |
Static Public Member Functions | |
| static | denormalize (array $raw) |
| Create new object from reduced array representation. More... | |
News Context DTO represents a context where news items can be associated with.
It encapsulates all relevant information about the context and provides validation, caching, and serialization capabilities.
Definition at line 28 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::__construct | ( | private readonly int | $ref_id, |
| private ?int | $obj_id = null, |
||
| private ?string | $obj_type = null, |
||
| private ?int | $parent_ref_id = null, |
||
| private int | $level = 0 |
||
| ) |
Definition at line 30 of file NewsContext.php.
|
static |
Create new object from reduced array representation.
| array<string,mixed> | $raw |
Definition at line 145 of file NewsContext.php.
Referenced by ILIAS\News\Persistence\NewsCache\getAggregatedContexts().
Here is the caller graph for this function:| ILIAS\News\Data\NewsContext::getLevel | ( | ) |
Definition at line 91 of file NewsContext.php.
Referenced by ILIAS\News\Aggregation\SubtreeAggregationStrategy\aggregate().
Here is the caller graph for this function:| ILIAS\News\Data\NewsContext::getObjId | ( | ) |
Definition at line 48 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::getObjType | ( | ) |
Definition at line 53 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::getParentRefId | ( | ) |
Definition at line 58 of file NewsContext.php.
Referenced by ILIAS\News\Data\NewsContext\isParentOf().
Here is the caller graph for this function:| ILIAS\News\Data\NewsContext::getRefId | ( | ) |
Definition at line 43 of file NewsContext.php.
References $ref_id.
Referenced by ILIAS\News\Aggregation\SubtreeAggregationStrategy\aggregate(), and ILIAS\News\Data\NewsContext\isChildOf().
Here is the caller graph for this function:| ILIAS\News\Data\NewsContext::isChildOf | ( | NewsContext | $parent_context | ) |
Check if this context is a child of another context.
Definition at line 103 of file NewsContext.php.
References ILIAS\News\Data\NewsContext\getRefId().
Here is the call graph for this function:| ILIAS\News\Data\NewsContext::isParentOf | ( | NewsContext | $child_context | ) |
Check if this context is a parent of another context.
Definition at line 111 of file NewsContext.php.
References $ref_id, and ILIAS\News\Data\NewsContext\getParentRefId().
Here is the call graph for this function:| ILIAS\News\Data\NewsContext::isRoot | ( | ) |
Check if this context is at the root level.
Definition at line 119 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::normalize | ( | ) |
Transform this object into array representation and keep only properties which are not default values.
Definition at line 133 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::setLevel | ( | int | $level | ) |
Definition at line 81 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::setObjId | ( | int | $obj_id | ) |
Definition at line 63 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::setObjType | ( | string | $obj_type | ) |
Definition at line 69 of file NewsContext.php.
| ILIAS\News\Data\NewsContext::setParentRefId | ( | ?int | $parent_ref_id | ) |
Definition at line 75 of file NewsContext.php.