1 | <?php |
||
23 | class NewReplyFormHandler extends AbstractFormHandler |
||
24 | { |
||
25 | /** |
||
26 | * A reply form processor |
||
27 | * @var NewReplyFormProcessorInterface |
||
28 | */ |
||
29 | protected $replyFormProcessor; |
||
30 | |||
31 | /** |
||
32 | * Constructor. |
||
33 | * |
||
34 | * @param Request $request The request the form will process |
||
35 | * @param NewReplyFormProcessorInterface $replyFormProcessor A reply form model processor |
||
36 | */ |
||
37 | public function __construct(Request $request, NewReplyFormProcessorInterface $replyFormProcessor) |
||
42 | |||
43 | /** |
||
44 | * Processes the form with the request |
||
45 | * |
||
46 | * @param FormInterface $form A form instance |
||
47 | * |
||
48 | */ |
||
49 | public function doProcess(FormInterface $form) |
||
56 | |||
57 | /** |
||
58 | * Gets the form data |
||
59 | * |
||
60 | * Helper function to get auto completion |
||
61 | * |
||
62 | * @param FormInterface $form |
||
63 | * |
||
64 | * @return ReplyMessageInterface |
||
65 | * |
||
66 | * @throws \InvalidArgumentException when wrong form data |
||
67 | */ |
||
68 | protected function getFormData(FormInterface $form) |
||
78 | |||
79 | /** |
||
80 | * Helper function if you need to extend this class. |
||
81 | * |
||
82 | * Here you have your custom form model which implements the NewThreadInterface. |
||
83 | * If you need extra processing of this valid form model you can extend this class and overwrite this function. |
||
84 | * |
||
85 | * An example... |
||
86 | * You want to store the ip address from the client. |
||
87 | * $newThreadFormModel->setIpAddress = $this->request->getClientIp(); |
||
88 | * |
||
89 | * @param ReplyMessageInterface $replyThreadFormModel |
||
90 | */ |
||
91 | protected function processFormModelExtra(ReplyMessageInterface $replyThreadFormModel) |
||
95 | } |
||
96 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.