Ejemplo n.º 1
0
 /**
  * Get list of mambership types & their plans
  * 
  * @return array mixed
  */
 public function getTypeListWithPlans()
 {
     $types = $this->membershipTypeDao->getTypeList();
     $typesWithPlans = array();
     foreach ($types as $key => $type) {
         $typesWithPlans[$key] = $type;
         $typesWithPlans[$key]['plans'] = $this->getPlanList($type['id']);
     }
     return $typesWithPlans;
 }
Ejemplo n.º 2
0
 /**
  * Get list of mambership types & their plans
  *
  * @param int $accTypeId
  * @return array mixed
  */
 public function getTypeListWithPlans($accTypeId = null)
 {
     $types = $this->membershipTypeDao->getTypeList($accTypeId);
     $typesWithPlans = array();
     foreach ($types as $key => $type) {
         $typesWithPlans[$key] = $type;
         $plans = $this->membershipPlanDao->findPlanListByTypeId($type['id']);
         if ($plans) {
             foreach ($plans as $plan) {
                 $typesWithPlans[$key]['plans'][] = array('dto' => $plan, 'plan_format' => $this->getFormattedPlan($plan->price, $plan->period, $plan->recurring));
             }
         }
     }
     return $typesWithPlans;
 }