<?php
namespace wcf\form;
+use wcf\data\AbstractDatabaseObjectAction;
use wcf\data\IStorableObject;
use wcf\system\event\EventHandler;
use wcf\system\exception\UserInputException;
*/
public $formObject;
+ /**
+ * name of the object action performing the form action
+ * if not set, `$formAction` is sued
+ * @var null|string
+ */
+ public $objectActionName;
+
/**
* name of the object action class performing the form action
* @var string
public function save() {
parent::save();
- $this->objectAction = new $this->objectActionClass(array_filter([$this->formObject]), $this->formAction, $this->form->getData());
+ /** @var AbstractDatabaseObjectAction objectAction */
+ $this->objectAction = new $this->objectActionClass(
+ array_filter([$this->formObject]),
+ $this->objectActionName ?: $this->formAction,
+ $this->form->getData()
+ );
$this->objectAction->executeAction();
$this->saved();