Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IAddToGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface IAddToGroupBackend {
/**
* @since 14.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IBatchMethodsBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @brief Optional interface for group backends
* @since 28.0.0
*/
#[Implementable(since: '28.0.0')]
interface IBatchMethodsBackend {
/**
* @brief Batch method to check if a list of groups exists
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/ICountDisabledInGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface ICountDisabledInGroup {
/**
* @since 14.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/ICountUsersBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface ICountUsersBackend {
/**
* @since 14.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/ICreateGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
* @deprecated 30.0.0 Use ICreateNamedGroupBackend instead
*/
#[Implementable(since: '14.0.0')]
interface ICreateGroupBackend {
/**
* @since 14.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/ICreateNamedGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 30.0.0
*/
#[Implementable(since: '30.0.0')]
interface ICreateNamedGroupBackend {
/**
* Tries to create a group from its name.
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IDeleteGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface IDeleteGroupBackend {
/**
* @since 14.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IGetDisplayNameBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 17.0.0
*/
#[Implementable(since: '17.0.0')]
interface IGetDisplayNameBackend {
/**
* @param string $gid
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IGroupDetailsBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @brief Optional interface for group backends
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface IGroupDetailsBackend {
/**
* @brief Get additional details for a group, for example the display name.
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IHideFromCollaborationBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 16.0.0
*
* Allow the backend to mark groups to be excluded from being shown in search dialogs
*/
#[Implementable(since: '16.0.0')]
interface IHideFromCollaborationBackend {
/**
* Check if a group should be hidden from search dialogs
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IIsAdminBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface IIsAdminBackend {
/**
* @since 14.0.0
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/INamedBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 22.0.0
*/
#[Implementable(since: '22.0.0')]
interface INamedBackend {
/**
* Backend name to be shown in group management
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/IRemoveFromGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 14.0.0
*/
#[Implementable(since: '14.0.0')]
interface IRemoveFromGroupBackend {
/**
* @since 14.0.0
Expand Down
2 changes: 2 additions & 0 deletions lib/public/Group/Backend/ISearchableGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;
use OCP\IUser;

/**
* @since 27.0.0
*/
#[Implementable(since: '27.0.0')]
interface ISearchableGroupBackend {
/**
* @brief Get a list of users matching the given search parameters.
Expand Down
3 changes: 3 additions & 0 deletions lib/public/Group/Backend/ISetDisplayNameBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@

namespace OCP\Group\Backend;

use OCP\AppFramework\Attribute\Implementable;

/**
* @since 18.0.0
*/
#[Implementable(since: '18.0.0')]
interface ISetDisplayNameBackend {
/**
* @param string $gid
Expand Down
37 changes: 10 additions & 27 deletions lib/public/Group/Events/BeforeGroupChangedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,53 @@

namespace OCP\Group\Events;

use OCP\AppFramework\Attribute\Implementable;
use OCP\EventDispatcher\Event;
use OCP\IGroup;

/**
* @since 26.0.0
*/
#[Implementable(since: '26.0.0')]
class BeforeGroupChangedEvent extends Event {
private IGroup $group;
private string $feature;
/** @var mixed */
private $value;
/** @var mixed */
private $oldValue;

/**
* @since 26.0.0
*/
public function __construct(IGroup $group,
string $feature,
$value,
$oldValue = null) {
public function __construct(
private readonly IGroup $group,
private readonly string $feature,
private readonly mixed $value,
private readonly mixed $oldValue = null,
) {
parent::__construct();
$this->group = $group;
$this->feature = $feature;
$this->value = $value;
$this->oldValue = $oldValue;
}

/**
*
* @since 26.0.0
*
* @return IGroup
*/
public function getGroup(): IGroup {
return $this->group;
}

/**
*
* @since 26.0.0
*
* @return string
*/
public function getFeature(): string {
return $this->feature;
}

/**
* @since 26.0.0
*
* @return mixed
*/
public function getValue() {
public function getValue(): mixed {
return $this->value;
}

/**
*
* @since 26.0.0
*
* @return mixed
*/
public function getOldValue() {
public function getOldValue(): mixed {
return $this->oldValue;
}
}
10 changes: 5 additions & 5 deletions lib/public/Group/Events/BeforeGroupCreatedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@

namespace OCP\Group\Events;

use OCP\AppFramework\Attribute\Implementable;
use OCP\EventDispatcher\Event;

/**
* @since 18.0.0
*/
#[Implementable(since: '18.0.0')]
class BeforeGroupCreatedEvent extends Event {
/** @var string */
private $name;

/**
* @since 18.0.0
*/
public function __construct(string $name) {
public function __construct(
private readonly string $name,
) {
parent::__construct();
$this->name = $name;
}

/**
Expand Down
11 changes: 5 additions & 6 deletions lib/public/Group/Events/BeforeGroupDeletedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,25 @@

namespace OCP\Group\Events;

use OCP\AppFramework\Attribute\Implementable;
use OCP\EventDispatcher\Event;
use OCP\IGroup;

/**
* @since 18.0.0
*/
#[Implementable(since: '18.0.0')]
class BeforeGroupDeletedEvent extends Event {
/** @var IGroup */
private $group;

/**
* @since 18.0.0
*/
public function __construct(IGroup $group) {
public function __construct(
private readonly IGroup $group,
) {
parent::__construct();
$this->group = $group;
}

/**
* @return IGroup
* @since 18.0.0
*/
public function getGroup(): IGroup {
Expand Down
16 changes: 6 additions & 10 deletions lib/public/Group/Events/BeforeUserAddedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,27 @@

namespace OCP\Group\Events;

use OCP\AppFramework\Attribute\Listenable;
use OCP\EventDispatcher\Event;
use OCP\IGroup;
use OCP\IUser;

/**
* @since 18.0.0
*/
#[Listenable(since: '18.0.0')]
class BeforeUserAddedEvent extends Event {
/** @var IGroup */
private $group;

/*** @var IUser */
private $user;

/**
* @since 18.0.0
*/
public function __construct(IGroup $group, IUser $user) {
public function __construct(
private readonly IGroup $group,
private readonly IUser $user,
) {
parent::__construct();
$this->group = $group;
$this->user = $user;
}

/**
* @return IGroup
* @since 18.0.0
*/
public function getGroup(): IGroup {
Expand Down
Loading
Loading