1 | <?php |
||
19 | class ContactsController extends AuthorizedController |
||
20 | { |
||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | protected $resource = Contact::class; |
||
25 | |||
26 | /** |
||
27 | * List all contacts. |
||
28 | * |
||
29 | * @param \Cortex\Contacts\DataTables\Managerarea\ContactsDataTable $contactsDataTable |
||
30 | * |
||
31 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
||
32 | */ |
||
33 | public function index(ContactsDataTable $contactsDataTable) |
||
39 | |||
40 | /** |
||
41 | * List contact logs. |
||
42 | * |
||
43 | * @param \Cortex\Contacts\Models\Contact $contact |
||
44 | * @param \Cortex\Foundation\DataTables\LogsDataTable $logsDataTable |
||
45 | * |
||
46 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
|
|||
47 | */ |
||
48 | public function logs(Contact $contact, LogsDataTable $logsDataTable) |
||
56 | |||
57 | /** |
||
58 | * Import contacts. |
||
59 | * |
||
60 | * @param \Cortex\Contacts\Models\Contact $contact |
||
61 | * @param \Cortex\Foundation\DataTables\ImportRecordsDataTable $importRecordsDataTable |
||
62 | * |
||
63 | * @return \Illuminate\View\View |
||
64 | */ |
||
65 | public function import(Contact $contact, ImportRecordsDataTable $importRecordsDataTable) |
||
74 | |||
75 | /** |
||
76 | * Stash contacts. |
||
77 | * |
||
78 | * @param \Cortex\Foundation\Http\Requests\ImportFormRequest $request |
||
79 | * @param \Cortex\Foundation\Importers\DefaultImporter $importer |
||
80 | * |
||
81 | * @return void |
||
82 | */ |
||
83 | public function stash(ImportFormRequest $request, DefaultImporter $importer) |
||
89 | |||
90 | /** |
||
91 | * Hoard contacts. |
||
92 | * |
||
93 | * @param \Cortex\Foundation\Http\Requests\ImportFormRequest $request |
||
94 | * |
||
95 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
96 | */ |
||
97 | public function hoard(ImportFormRequest $request) |
||
120 | |||
121 | /** |
||
122 | * List contact import logs. |
||
123 | * |
||
124 | * @param \Cortex\Foundation\DataTables\ImportLogsDataTable $importLogsDatatable |
||
125 | * |
||
126 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
127 | */ |
||
128 | public function importLogs(ImportLogsDataTable $importLogsDatatable) |
||
136 | |||
137 | /** |
||
138 | * Create new contact. |
||
139 | * |
||
140 | * @param \Cortex\Contacts\Models\Contact $contact |
||
141 | * |
||
142 | * @return \Illuminate\View\View |
||
143 | */ |
||
144 | public function create(Contact $contact) |
||
148 | |||
149 | /** |
||
150 | * Edit given contact. |
||
151 | * |
||
152 | * @param \Cortex\Contacts\Models\Contact $contact |
||
153 | * |
||
154 | * @return \Illuminate\View\View |
||
155 | */ |
||
156 | public function edit(Contact $contact) |
||
160 | |||
161 | /** |
||
162 | * Show contact create/edit form. |
||
163 | * |
||
164 | * @param \Cortex\Contacts\Models\Contact $contact |
||
165 | * |
||
166 | * @return \Illuminate\View\View |
||
167 | */ |
||
168 | protected function form(Contact $contact) |
||
184 | |||
185 | /** |
||
186 | * Store new contact. |
||
187 | * |
||
188 | * @param \Cortex\Contacts\Http\Requests\Managerarea\ContactFormRequest $request |
||
189 | * @param \Cortex\Contacts\Models\Contact $contact |
||
190 | * |
||
191 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
192 | */ |
||
193 | public function store(ContactFormRequest $request, Contact $contact) |
||
197 | |||
198 | /** |
||
199 | * Update given contact. |
||
200 | * |
||
201 | * @param \Cortex\Contacts\Http\Requests\Managerarea\ContactFormRequest $request |
||
202 | * @param \Cortex\Contacts\Models\Contact $contact |
||
203 | * |
||
204 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
205 | */ |
||
206 | public function update(ContactFormRequest $request, Contact $contact) |
||
210 | |||
211 | /** |
||
212 | * Process stored/updated contact. |
||
213 | * |
||
214 | * @param \Illuminate\Foundation\Http\FormRequest $request |
||
215 | * @param \Cortex\Contacts\Models\Contact $contact |
||
216 | * |
||
217 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
218 | */ |
||
219 | protected function process(FormRequest $request, Contact $contact) |
||
232 | |||
233 | /** |
||
234 | * Destroy given contact. |
||
235 | * |
||
236 | * @param \Cortex\Contacts\Models\Contact $contact |
||
237 | * |
||
238 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
239 | */ |
||
240 | public function destroy(Contact $contact) |
||
249 | } |
||
250 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.