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
4 changes: 0 additions & 4 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1448,12 +1448,8 @@
</DeprecatedMethod>
</file>
<file src="apps/files/lib/Controller/DirectEditingController.php">
<InvalidArgument>
<code><![CDATA[$templateId]]></code>
</InvalidArgument>
<UndefinedInterfaceMethod>
<code><![CDATA[getTemplates]]></code>
<code><![CDATA[open]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="apps/files/lib/Controller/ViewController.php">
Expand Down
22 changes: 10 additions & 12 deletions lib/public/DirectEditing/IManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,38 @@ interface IManager {
* Register a new editor
*
* @since 18.0.0
* @param IEditor $directEditor
*/
public function registerDirectEditor(IEditor $directEditor): void;

/**
* Open the editing page for a provided token
*
* @since 18.0.0
* @param string $token
* @return Response
*/
public function edit(string $token): Response;

/**
* Create a new token based on the file path and editor details
* Create a file and generate a token based on the file path and editor details
*
* @since 18.0.0
* @param string $path
* @param string $editorId
* @param string $creatorId
* @param null $templateId
* @return string
* @throws NotPermittedException
* @throws RuntimeException
*/
public function create(string $path, string $editorId, string $creatorId, $templateId = null): string;

/**
* Create a token based on an existing file path and editor details
*
* @since 35.0.0
* @throws NotPermittedException
* @throws RuntimeException
*/
public function open(string $filePath, ?string $editorId = null, ?int $fileId = null): string;

/**
* Get the token details for a given token
*
* @since 18.0.0
* @param string $token
* @return IToken
*/
public function getToken(string $token): IToken;

Expand All @@ -71,7 +70,6 @@ public function cleanup(): int;
* Check if direct editing is enabled
*
* @since 20.0.0
* @return bool
*/
public function isEnabled(): bool;

Expand Down
9 changes: 5 additions & 4 deletions lib/public/DirectEditing/IToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function invalidate(): void;
* Check if the token has already been used
*
* @since 18.0.0
* @return bool
*/
public function hasBeenAccessed(): bool;

Expand All @@ -47,20 +46,22 @@ public function useTokenScope(): void;
* Get the file that is related to the token
*
* @since 18.0.0
* @return File
* @throws NotFoundException
*/
public function getFile(): File;

/**
* @since 18.0.0
* @return string
*/
public function getEditor(): string;

/**
* @since 18.0.0
* @return string
*/
public function getUser(): string;

/**
* @since 35.0.0
*/
public function getToken(): string;
}
Loading