Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | class AutocompleteController extends Controller |
||
24 | { |
||
25 | /** |
||
26 | * @inheritDoc |
||
27 | */ |
||
28 | public function beforeAction($action): bool |
||
29 | { |
||
30 | if (CodeEditor::$settings->allowFrontendAccess) { |
||
31 | $this->allowAnonymous = 1; |
||
32 | } |
||
33 | |||
34 | return parent::beforeAction($action); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Return all of the autocomplete items in JSON format |
||
39 | * |
||
40 | * @param string $fieldType |
||
41 | * @param string $codeEditorOptions |
||
42 | * @return Response |
||
43 | */ |
||
44 | public function actionIndex(string $fieldType = CodeEditor::DEFAULT_FIELD_TYPE, string $codeEditorOptions = ''): Response |
||
54 | } |
||
55 | } |
||
56 |