コード例 #1
0
ファイル: FileLink.php プロジェクト: belapp/opus4-application
 public function setValue($file)
 {
     if (is_null($file)) {
         throw new Application_Exception(__METHOD__ . " Value must not be null.");
     }
     if (!$file instanceof Opus_File) {
         try {
             $file = new Opus_File($file);
         } catch (Opus_Model_NotFoundException $omnfe) {
             throw new Application_Exception("File with ID = {$file} not found.");
         }
     }
     if (!$file->exists()) {
         $this->addError('admin_filemanager_file_does_not_exist');
     }
     parent::setValue($file);
 }