3 namespace wcf\acp\form
;
5 use wcf\data\contact\option\ContactOption
;
6 use wcf\data\contact\option\ContactOptionAction
;
7 use wcf\data\contact\option\ContactOptionEditor
;
8 use wcf\system\request\LinkHandler
;
12 * Shows the contact option add form.
14 * @author Alexander Ebert
15 * @copyright 2001-2019 WoltLab GmbH
16 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
19 class ContactOptionAddForm
extends AbstractCustomOptionForm
24 public $action = 'add';
29 public $activeMenuItem = 'wcf.acp.menu.link.contact.settings';
34 public $neededModules = ['MODULE_CONTACT_FORM'];
39 public $neededPermissions = ['admin.contact.canManageContactForm'];
45 public $actionClass = ContactOptionAction
::class;
51 public $baseClass = ContactOption
::class;
57 public $editorClass = ContactOptionEditor
::class;
62 public function readParameters()
64 parent
::readParameters();
66 $this->getI18nValue('optionTitle')->setLanguageItem('wcf.contact.option', 'wcf.contact', 'com.woltlab.wcf');
67 $this->getI18nValue('optionDescription')->setLanguageItem(
68 'wcf.contact.optionDescription',
77 public function save()
81 WCF
::getTPL()->assign([
82 'objectEditLink' => LinkHandler
::getInstance()->getControllerLink(
83 ContactOptionEditForm
::class,
84 ['id' => $this->objectAction
->getReturnValues()['returnValues']->getObjectID()]