Skip to content

Commit

Permalink
Update OCP
Browse files Browse the repository at this point in the history
  • Loading branch information
nextcloud-command committed Mar 21, 2024
1 parent 1d42e4d commit 5da2030
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 13 additions & 1 deletion OCP/Files/Template/TemplateFileCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ final class TemplateFileCreator implements \JsonSerializable {
protected $fileExtension;
/** @var ?string $iconClass */
protected $iconClass;
/** @var ?string $iconSvgInline */
protected $iconSvgInline;
/** @var ?float $ratio */
protected $ratio = null;
protected $order = 100;
Expand Down Expand Up @@ -66,12 +68,21 @@ public function getAppId(): string {

/**
* @since 21.0.0
* @deprecated 29.0.0
*/
public function setIconClass(string $iconClass): TemplateFileCreator {
$this->iconClass = $iconClass;
return $this;
}

/**
* @since 29.0.0
*/
public function setIconSvgInline(string $iconSvgInline): TemplateFileCreator {
$this->iconSvgInline = $iconSvgInline;
return $this;
}

/**
* @since 21.0.0
*/
Expand Down Expand Up @@ -128,14 +139,15 @@ public function getActionLabel(): string {

/**
* @since 21.0.0
* @return array{app: string, label: string, extension: string, iconClass: ?string, mimetypes: string[], ratio: ?float, actionLabel: string}
* @return array{app: string, label: string, extension: string, iconClass: ?string, iconSvgInline: ?string, mimetypes: string[], ratio: ?float, actionLabel: string}
*/
public function jsonSerialize(): array {
return [
'app' => $this->appId,
'label' => $this->actionName,
'extension' => $this->fileExtension,
'iconClass' => $this->iconClass,
'iconSvgInline' => $this->iconSvgInline,
'mimetypes' => $this->mimetypes,
'ratio' => $this->ratio,
'actionLabel' => $this->actionLabel,
Expand Down
8 changes: 8 additions & 0 deletions OCP/IUserSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ public function logout();
*/
public function setUser($user);

/**
* Temporarily set the currently active user without persisting in the session
*
* @param IUser|null $user
* @since 29.0.0
*/
public function setVolatileActiveUser(?IUser $user): void;

/**
* get the current active user
*
Expand Down

0 comments on commit 5da2030

Please sign in to comment.