Merge pull request #22137 from nextcloud/enh/noid/file-entity-icon

File entity to implement IIcon
This commit is contained in:
Morris Jobke 2020-08-07 11:06:26 +02:00 committed by GitHub
commit a761e5fef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -43,12 +43,13 @@ use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\MapperEvent;
use OCP\WorkflowEngine\EntityContext\IContextPortation;
use OCP\WorkflowEngine\EntityContext\IDisplayText;
use OCP\WorkflowEngine\EntityContext\IIcon;
use OCP\WorkflowEngine\EntityContext\IUrl;
use OCP\WorkflowEngine\GenericEntityEvent;
use OCP\WorkflowEngine\IEntity;
use OCP\WorkflowEngine\IRuleMatcher;
class File implements IEntity, IDisplayText, IUrl, IContextPortation {
class File implements IEntity, IDisplayText, IUrl, IIcon, IContextPortation {
private const EVENT_NAMESPACE = '\OCP\Files::';
/** @var IL10N */
@ -270,4 +271,11 @@ class File implements IEntity, IDisplayText, IUrl, IContextPortation {
$this->actingUser = $this->userManager->get($contextIDs['actingUserId']);
}
}
/**
* @inheritDoc
*/
public function getIconUrl(): string {
return $this->getIcon();
}
}