# Confirm 1.0.4+

# TC\ComponentLibrary\ControllerPlugin\Confirm

# assertActionConfirmed

Asserts user to confirm an action.

The POST request is considered confirmed. In other cases, a confirmation form will be displayed.

# Arguments

Argument Type Default value Description
confirmUrl string URL to submit the conformation form.
actionDescription string XF::phrase('tc_clib_please_confirm_you_want_to_perform_this_action') An action description to display on the confirmation page.
viewClass string TC\ComponentLibrary:ActionConfirm View class.
template string public:tc_clib_action_confirm Confirmation page template.
params array [] Page parameters.

# Examples


namespace Demo\AddOn\Pub\Controller;

use TC\ComponentLibrary\ControllerPlugin\Confirm;
use XF\Pub\Controller\AbstractController;

class Example extends AbstractController
    public function actionIndex()
        /** @var Confirm $confirmationPlugin */
        $confirmationPlugin = $this->plugin('TC\ComponentLibrary:Confirm');

        // action confirmed, do stuff here...