/** * @param $actionId * @return array */ public function findActionPriceForAllAccountTypes($actionId) { if (!$actionId) { return null; } $accountTypeIdList = array(); $types = BOL_QuestionService::getInstance()->findAllAccountTypes(); foreach ($types as $accType) { if (!in_array($accType->id, $accountTypeIdList)) { $accountTypeIdList[] = $accType->id; } } $def = array_fill_keys($accountTypeIdList, null); $actionPriceList = $this->actionPriceDao->findActionPriceForAccountTypeList($actionId, $accountTypeIdList); if (!$actionPriceList) { return $def; } $result = array(); foreach ($actionPriceList as $actionPrice) { $result[$actionPrice->accountTypeId] = $actionPrice; } return $result; }