Beispiel #1
0
 /**
  * Finds credits actions by type
  * 
  * @param string $type
  */
 public function findCreditsActions($type)
 {
     $list = $this->actionDao->findList($type);
     $actions = array();
     foreach ($list as $action) {
         $actions[] = array('dto' => $action, 'title' => $this->getActionTitle($action->pluginKey, $action->actionKey));
     }
     return $actions;
 }
 /**
  * Finds credits actions by type
  *
  * @param string $type
  * @param $accTypeId
  * @param bool $forAdmin
  * @return array
  */
 public function findCreditsActions($type, $accTypeId, $forAdmin = true)
 {
     $questionService = BOL_QuestionService::getInstance();
     if (!$accTypeId) {
         /* @var $def BOL_QuestionAccountType */
         $def = $questionService->getDefaultAccountType();
         $accTypeId = $def->id;
     }
     $list = $this->actionDao->findList($type, $accTypeId);
     $actions = array();
     foreach ($list as $action) {
         if (!$forAdmin && ($action['disabled'] || !empty($action['settingsRoute']))) {
             continue;
         }
         $action['title'] = $this->getActionTitle($action['pluginKey'], $action['actionKey']);
         $actions[] = $action;
     }
     return $actions;
 }