f3->get('CURRENT_USER'); $operatorId = $currentOperator->id; $scheduledForEnrichment = $dataController->getScheduledForEnrichment(); $pageParams = [ 'LOAD_AUTOCOMPLETE' => true, 'LOAD_DATATABLE' => true, 'HTML_FILE' => 'admin/api.html', 'JS' => 'admin_api.js', 'API_URL' => \Utils\Variables::getSiteWithProtocol() . '/sensor/', 'SCHEDULED_FOR_ENRICHMENT' => $scheduledForEnrichment, ]; if ($this->isPostRequest()) { $params = $this->f3->get('POST'); $params['id'] = $operatorId; $operationResponse = $dataController->proceedPostRequest($params); $pageParams = array_merge($pageParams, $operationResponse); $pageParams['CMD'] = $params['cmd'] ?? null; } // set these params after proccessing POST request [$isOwner, $apiKeys] = $dataController->getOperatorApiKeysDetails($operatorId); $pageParams['IS_OWNER'] = $isOwner; $pageParams['API_KEYS'] = $apiKeys; $pageParams['NOT_CHECKED'] = $dataController->getNotCheckedEntitiesForLoggedUser(); return parent::applyPageParams($pageParams); } }