Getting started on POST for ticket controller
This commit is contained in:
parent
dc0c8a351b
commit
843528252b
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Controllers\Tickets;
|
namespace Controllers\Tickets;
|
||||||
|
|
||||||
|
use BusinessLogic\Tickets\TicketCreator;
|
||||||
use BusinessLogic\Tickets\TicketRetriever;
|
use BusinessLogic\Tickets\TicketRetriever;
|
||||||
|
|
||||||
|
|
||||||
@ -14,4 +15,15 @@ class TicketController {
|
|||||||
|
|
||||||
output($ticketRetriever->getTicketById($id, $hesk_settings, $userContext));
|
output($ticketRetriever->getTicketById($id, $hesk_settings, $userContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function post() {
|
||||||
|
global $applicationContext, $hesk_settings, $modsForHeskSettings, $userContext;
|
||||||
|
|
||||||
|
/* @var $ticketCreator TicketCreator */
|
||||||
|
$ticketCreator = $applicationContext->get[TicketCreator::class];
|
||||||
|
|
||||||
|
//-- TODO Parse POST data
|
||||||
|
|
||||||
|
$ticketCreator->createTicketByCustomer(null, $hesk_settings, $modsForHeskSettings, $userContext);
|
||||||
|
}
|
||||||
}
|
}
|
@ -18,3 +18,4 @@ require_once(__DIR__ . '/../inc/custom_fields.inc.php');
|
|||||||
|
|
||||||
// Load the ApplicationContext
|
// Load the ApplicationContext
|
||||||
$applicationContext = new \ApplicationContext();
|
$applicationContext = new \ApplicationContext();
|
||||||
|
$modsForHeskSettings = mfh_getSettings();
|
Loading…
x
Reference in New Issue
Block a user