Esempio n. 1
0
 /**
  * Draw the widget
  */
 public function run()
 {
     $files = array();
     if ($this->object !== null) {
         if ($this->object->isNewRecord && $this->object->getRelation('content', false) !== null) {
             $files = File::findAll(['guid' => array_map('trim', explode(',', $this->object->content->attachFileGuidsAfterSave))]);
         } else {
             $files = File::getFilesOfObject($this->object);
         }
     }
     return $this->render('fileUploadList', array('uploaderId' => $this->uploaderId, 'files' => $files));
 }