getRulesForLoggedUser(); $searchPlacholder = $this->f3->get('AdminRules_search_placeholder'); $currentOperator = $this->f3->get('CURRENT_USER'); $operatorId = $currentOperator->id; $ruleValues = [ ['value' => -20, 'text' => $this->f3->get('AdminRules_weight_minus20')], ['value' => 0, 'text' => $this->f3->get('AdminRules_weight_0')], ['value' => 10, 'text' => $this->f3->get('AdminRules_weight_10')], ['value' => 20, 'text' => $this->f3->get('AdminRules_weight_20')], ['value' => 70, 'text' => $this->f3->get('AdminRules_weight_70')], ]; $pageParams = [ 'LOAD_DATATABLE' => true, 'LOAD_AUTOCOMPLETE' => true, 'HTML_FILE' => 'admin/rules.html', 'JS' => 'admin_rules.js', 'RULE_VALUES' => $ruleValues, 'RULES' => $rules, 'SEARCH_PLACEHOLDER' => $searchPlacholder, ]; if ($this->isPostRequest()) { $params = $this->f3->get('POST'); $params['id'] = $operatorId; $operationResponse = $dataController->proceedPostRequest($params); $pageParams = array_merge($pageParams, $operationResponse); $pageParams['CMD'] = $params['cmd']; $pageParams['RULES'] = $dataController->getRulesForLoggedUser(); } // set api_keys param after proccessing POST request [$isOwner, $apiKeys] = $dataController->getOperatorApiKeys($operatorId); $pageParams['IS_OWNER'] = $isOwner; $pageParams['API_KEYS'] = $apiKeys; return parent::applyPageParams($pageParams); } }