Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add new activity for submissions on shared forms
Also move activity creation from controller into service. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
- Loading branch information
Showing
10 changed files
with
363 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (c) 2023 Ferdinand Thiessen <rpm@fthiessen.de> | ||
* | ||
* @author Ferdinand Thiessen <rpm@fthiessen.de> | ||
* | ||
* @license AGPL-3.0-or-later | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
namespace OCA\Forms\Activity\Settings; | ||
|
||
use OCA\Forms\Activity\ActivityConstants; | ||
|
||
class NewSharedSubmission extends FormsActivitySettings { | ||
/** | ||
* Event-Type this setting applies to | ||
* Only lowercase letters and underscore allowed | ||
* @return string | ||
*/ | ||
public function getIdentifier(): string { | ||
return ActivityConstants::TYPE_NEWSHAREDSUBMISSION; | ||
} | ||
|
||
/** | ||
* Text of the setting | ||
* @return string Translated String | ||
*/ | ||
public function getName(): string { | ||
return $this->l10n->t('Someone <strong>answered</strong> a shared form'); | ||
} | ||
|
||
/** | ||
* Priority of the Setting | ||
* Using Forms Base-Priority (parent) | ||
* @return int | ||
*/ | ||
public function getPriority(): int { | ||
return parent::getPriority() + 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.