To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Show
Ignore:
Timestamp:
04/28/10 11:48:44 (2 years ago)
Author:
dordille
Message:

Added methods to retrieve data from forms.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheFormBuilderPlugin/trunk/lib/model/doctrine/PluginaForm.class.php

    r936 r1084  
    4646  } 
    4747 
    48   public function getSubform($rank = 0, $aFormSubmission = null) 
     48  public function getSubform($rank = 0, $aFormSubmission = null, $options = array()) 
    4949  { 
    5050    $i = 0; 
     
    6464    $form = new aFormBuilder( 
    6565      $aFormSubmission, 
    66       array('a_form' => $this, 'a_form_fieldsets' => $subFieldset)); 
     66      array_merge( 
     67        $options, 
     68        array('a_form' => $this, 'a_form_fieldsets' => $subFieldset) 
     69    )); 
    6770     
    6871    return $form; 
     
    8285  } 
    8386 
     87  public function getUserSubmissions($user_id, $q = null, $hydrationMode = null) 
     88  { 
     89    return Doctrine::getTable('aFormSubmission') 
     90      ->getUserSubmissionsQuery($this['id'], $user_id, $q) 
     91      ->execute(array(), $hydrationMode); 
     92  } 
     93 
    8494}