Initial upload to Gitea
This commit is contained in:
1 parent
78193254ad
commit
8478998cae
1485 files changed
+461025
-42348
No files matched your search
+94
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright 2020 - 2026 grommunio GmbH
|
||||
* SPDX-FileCopyrightText: Copyright 2016 Kopano and its licensors
|
||||
* SPDX-FileCopyrightText: Copyright 2005 - 2016 Zarafa B.V. and its licensors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
/**
|
||||
* StickyNote Module.
|
||||
*/
|
||||
class StickyNoteListModule extends ListModule {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int $id unique id
|
||||
* @param array $data list of all actions
|
||||
*/
|
||||
public function __construct($id, $data) {
|
||||
parent::__construct($id, $data);
|
||||
|
||||
$this->properties = $GLOBALS["properties"]->getStickyNoteListProperties();
|
||||
|
||||
$this->start = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the notifiers for this module,
|
||||
* and register them to the Bus.
|
||||
*/
|
||||
public function createNotifiers() {
|
||||
$entryid = $this->getEntryID();
|
||||
$GLOBALS["bus"]->registerNotifier('stickynotelistnotifier', $entryid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes all the actions in the $data variable.
|
||||
*/
|
||||
#[Override]
|
||||
public function execute() {
|
||||
foreach ($this->data as $actionType => $action) {
|
||||
if (isset($actionType)) {
|
||||
try {
|
||||
$store = $this->getActionStore($action);
|
||||
$entryid = $this->getActionSingleEntryID($action);
|
||||
if ($store === false || is_array($store)) {
|
||||
$this->sendFeedback(false);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ($actionType) {
|
||||
case "list":
|
||||
$this->messageList($store, $entryid, $action, $actionType);
|
||||
break;
|
||||
|
||||
case "search":
|
||||
$this->search($store, $entryid, $action, $actionType);
|
||||
break;
|
||||
|
||||
case "updatesearch":
|
||||
$this->updatesearch($store, $entryid, $action);
|
||||
break;
|
||||
|
||||
case "stopsearch":
|
||||
$this->stopSearch($store, $entryid, $action);
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->handleUnknownActionType($actionType);
|
||||
}
|
||||
}
|
||||
catch (MAPIException $e) {
|
||||
$this->processException($e, $actionType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function will be used to process private items in a list response,
|
||||
* sticky notes doesn't have private items so function is overridden to not do
|
||||
* any processing.
|
||||
*
|
||||
* @param array $item item properties
|
||||
*
|
||||
* @return array unchanged item properties
|
||||
*/
|
||||
#[Override]
|
||||
public function processPrivateItem($item) {
|
||||
return $item;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user