#
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
#
Examples
<?php
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');
$confirmationPlugin->assertActionConfirmed(
$this->buildLink('demo/example')
);
// action confirmed, do stuff here...
}
}