Advertisement
vishnu3006

newaddedProjectIds

Oct 13th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1.  $ticket = ($arrResponse->LogonResult);
  2.   $getSrcLang = $AddFile->GetSourceLanguages(array('Ticket'=>$ticket));
  3.   $getDraftProjectIds = $AddFile->GetProjectSummariesList(array('Ticket'=>$ticket,'NumberOfProjects'=>100,'SortOrder'=>MostRecent,'ProjectStatusCode'=>'Draft'));
  4.  
  5.                 $array = array();
  6.                $listOfProjects = array();
  7.                
  8.                 foreach
  9.                 ($getSrcLang->GetSourceLanguagesResult->Languages->Language as $language)              
  10.                 {                                      
  11.                 $array[$language->ID] = $language->Description;
  12.                 }
  13.                 foreach
  14.                 ($getDraftProjectIds->ProjectSummaries->ProjectSummary as $projectSummary)
  15.                 {
  16.                 $listOfProjects[$projectSummary->ID] = $projectSummary-> ID;
  17.                 }
  18.                
  19.   }
  20.   catch (SoapFault $exception){
  21.   return $exception;
  22.   }
  23.  
  24.  
  25. $form['folks_list']=array(
  26.         '#type'=>'select',
  27.         '#title' => t('Freeway Source Languages'),
  28.         //'#default_value' => array('1'=>'Joe'),
  29.         '#options' => $array,
  30.         '#multiple' => false,
  31.         '#attributes'=>array('size'=>4),
  32.         '#weight'=>8,
  33.     );
  34.  
  35.  
  36.   $form['projectId'] = array(
  37.   '#type' => 'select',
  38.   '#title' => t('List of Draft projects created by you.'),
  39.    '#weight'=>9,
  40.   '#options' => $listOfProjects,
  41. );
  42.  
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement