Element_OphTrConsent_Procedure::model PHP Method

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

Example #1
0
 public function getFooterProcedures($event_id)
 {
     if (!($event = Event::model()->findByPk($event_id))) {
         throw new Exception("Event not found: {$event_id}");
     }
     if (!($element = Element_OphTrConsent_Procedure::model()->find('event_id=?', array($event->id)))) {
         throw new Exception("Procedure element not found, possibly not a consent event: {$event_id}");
     }
     $return = 'Procedure(s): ';
     foreach ($element->procedures as $i => $proc) {
         if ($i >= 2) {
             $return .= '...';
             break;
         } elseif ($i) {
             $return .= ', ';
         }
         $return .= $proc->term;
     }
     return $return;
 }
All Usage Examples Of Element_OphTrConsent_Procedure::model