add ext-form
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
$formsRepository = new \Plugi\Extensions\Form\DefinitionsRepository();
|
||||
|
||||
$form = $formsRepository->findWithId($_GET['id']);
|
||||
$formFinishers = json_decode($form['finishers'], true);
|
||||
|
||||
$finishers = new \Plugi\Extensions\Form\Finishers\FinishersRepository();
|
||||
|
||||
|
||||
|
||||
foreach ($formFinishers as $finisher) {
|
||||
if ($finishers->finisherExists($finisher['type'])) {
|
||||
$config = $finishers->getFinisherConfig($finisher['type']);
|
||||
$instance = new $config['class'];
|
||||
$instance->execute();
|
||||
}
|
||||
}
|
||||
|
||||
phpb_redirect('/', [], 201);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user