Skip to content

Commit 3207ed3

Browse files
Updates, content added
1 parent 3b4f1d5 commit 3207ed3

16 files changed

+298
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Extend Collaborative editing feature by creating custom session or participant type.
3+
month_change: false
4+
---
5+
6+
# Extend Collaborative editing
7+
8+
## Custom Session Type use case
9+
10+
### Create custom Session Type
11+
12+
## Custom Participant Type use case
13+
14+
### Create custom Participant Type
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ContentID Criterion
2+
3+
The `ContentID` Search Criterion searches for content sessions based on content item ID.
4+
5+
## Arguments
6+
7+
- `value` - integer(s) representing the content item id(s)
8+
9+
## Example
10+
11+
```php
12+
$criteria = new Ibexa\Share\Session\Query\Criterion\ContentId(1);
13+
14+
OR
15+
16+
$criteria = new Ibexa\Share\Session\Query\Criterion\ContentId([1, 2]);
17+
18+
$query = new SessionQuery($criteria);
19+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ContentSession Criterion
2+
3+
The `ContentSession` Search Criterion searches for contentId, versionNo, languageId.
4+
5+
## Arguments
6+
7+
- `contentId` - integer representing content item ID
8+
- `versionNo` - integer representing version number
9+
- `languageId` - integer representing language ID
10+
11+
## Example
12+
13+
```php
14+
$criteria = new Ibexa\Share\Session\Query\Criterion\ContentSession(1, 2, 3);
15+
16+
OR
17+
18+
$versionInfo = $this->contentService->loadVersionInfoById(1);
19+
$criteria = new Ibexa\Share\Session\Query\Criterion\ContentSession::fromVersionInfo($versionInfo);
20+
21+
$query = new SessionQuery($criteria);
22+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CreatedAt Criterion
2+
3+
The `CreatedAtCriterion` Search Criterion searches for sessions based on the date when they were created.
4+
5+
## Arguments
6+
7+
- `value` - date to be matched, provided as a DateTimeInterface object
8+
- `operator` - optional operator string (EQ, GT, GTE, LT, LTE)
9+
10+
## Example
11+
12+
```php
13+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\CreatedAt(
14+
new DateTime('2025-05-01 14:07:02'),
15+
'GTE'
16+
);
17+
18+
$query = new SessionQuery($criteria);
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Email Criterion
2+
3+
The `Email` Search Criterion searches for sessions based on participant email.
4+
5+
## Arguments
6+
7+
- `value` - string(s) representing the Participant email(s)
8+
9+
## Example
10+
11+
```php
12+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Email('[email protected]');
13+
14+
OR
15+
16+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Email(['[email protected]', '[email protected]']);
17+
18+
$query = new SessionQuery($criteria);
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ID Criterion
2+
3+
The `ID` Search Criterion searches for sessions based on session ID.
4+
5+
## Arguments
6+
7+
- `value` - integer(s) representing the Session id(s)
8+
9+
## Example
10+
11+
```php
12+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Id(1);
13+
14+
OR
15+
16+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Id([1, 2]);
17+
18+
$query = new SessionQuery($criteria);
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# IsActive Criterion
2+
3+
The `IsActive` Search Criterion searches for sessions based on active status.
4+
5+
## Arguments
6+
7+
- (optional) `value` - bool representing the whether to search for active (default true) or inactive (false) sessions.
8+
9+
## Example
10+
11+
```php
12+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\IsActive();
13+
14+
OR
15+
16+
$criteria = new Ibexa\Contracts\Collaboration\Session\Query\Criterion\IsActive(false);
17+
18+
$query = new SessionQuery($criteria);
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# LanguageID Criterion
2+
3+
The `LanguageID` Search Criterion searches for content sessions based on language ID of content item.
4+
5+
## Arguments
6+
7+
- `value` - integer(s) representing language id(s)
8+
9+
## Example
10+
11+
```php
12+
$criteria = new Ibexa\Share\Session\Query\Criterion\LanguageId(1);
13+
14+
OR
15+
16+
$criteria = new Ibexa\Share\Session\Query\Criterion\LanguageId([1, 2]);
17+
18+
$query = new SessionQuery($criteria);
19+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# LogicalAnd Criterion
2+
3+
The `LogicalAnd` Search Criterion matches combined by the logical operator.
4+
5+
## Example
6+
7+
```php
8+
$criteria = Ibexa\Contracts\Collaboration\Session\Query\Criterion\LogicalAnd(
9+
new Ibexa\Contracts\Collaboration\Session\Query\Criterion\IsActive(),
10+
new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Type('content')
11+
);
12+
13+
$query = new SessionQuery($criteria);
14+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# LogicalOr Criterion
2+
3+
The `LogicalOr` Search Criterion matches combined by the logical operator.
4+
5+
## Example
6+
7+
```php
8+
$criteria = Ibexa\Contracts\Collaboration\Session\Query\Criterion\LogicalOr( ,
9+
new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Id(1),
10+
new Ibexa\Contracts\Collaboration\Session\Query\Criterion\Token('12345-12345-12345-12345')
11+
);
12+
13+
$query = new SessionQuery($criteria);
14+
```

0 commit comments

Comments
 (0)