public static function convertCompanyServiceToArray(ICompanyService $company_service)
 {
     $res = array();
     //header
     $res['id'] = $company_service->getIdentifier();
     $res['name'] = $company_service->getName();
     $res['overview'] = $company_service->getOverview();
     $res['call_2_action_uri'] = $company_service->getCall2ActionUri();
     $res['active'] = $company_service->isActive();
     $company = $company_service->getCompany();
     if ($company) {
         $res['company_id'] = $company->getIdentifier();
     }
     //resources
     $additional_resources = array();
     foreach ($company_service->getResources() as $resource) {
         array_push($additional_resources, CompanyServiceAssembler::convertResource2Array($resource));
     }
     $res['additional_resources'] = $additional_resources;
     //videos
     $videos = array();
     foreach ($company_service->getVideos() as $video) {
         array_push($videos, MarketPlaceAssembler::convertVideo2Array($video));
     }
     $res['videos'] = $videos;
     //draft
     if ($company_service->isDraft()) {
         $res['live_service_id'] = $company_service->getLiveServiceId();
     }
     return $res;
 }
 public static function convertRegionalSupportedCompanyServiceToArray(IRegionalSupportedCompanyService $company_service)
 {
     $res = CompanyServiceAssembler::convertCompanyServiceToArray($company_service);
     //regional support
     $regional_supports = array();
     foreach ($company_service->getRegionalSupports() as $regional_support) {
         array_push($regional_supports, self::convertRegionalSupportToArray($regional_support));
     }
     $res['regional_support'] = $regional_supports;
     return $res;
 }