Ejemplo n.º 1
0
 /**
  * Internal function to return an ArticleGalley object from a row.
  * @param $row array
  * @return ArticleGalley
  */
 function &_returnGalleyFromRow(&$row)
 {
     if ($row['html_galley']) {
         $galley = new ArticleHTMLGalley();
         // HTML-specific settings
         $galley->setStyleFileId($row['style_file_id']);
         if ($row['style_file_id']) {
             $galley->setStyleFile($this->articleFileDao->getArticleFile($row['style_file_id']));
         }
         // Retrieve images
         $images =& $this->getGalleyImages($row['galley_id']);
         $galley->setImageFiles($images);
     } else {
         $galley = new ArticleGalley();
     }
     $galley->setId($row['galley_id']);
     $galley->setArticleId($row['article_id']);
     $galley->setLocale($row['locale']);
     $galley->setFileId($row['file_id']);
     $galley->setLabel($row['label']);
     $galley->setFileStage($row['file_stage']);
     $galley->setSequence($row['seq']);
     $galley->setRemoteURL($row['remote_url']);
     // ArticleFile set methods
     $galley->setFileName($row['file_name']);
     $galley->setOriginalFileName($row['original_file_name']);
     $galley->setFileType($row['file_type']);
     $galley->setFileSize($row['file_size']);
     $galley->setDateModified($this->datetimeFromDB($row['date_modified']));
     $galley->setDateUploaded($this->datetimeFromDB($row['date_uploaded']));
     $this->getDataObjectSettings('article_galley_settings', 'galley_id', $row['galley_id'], $galley);
     HookRegistry::call('ArticleGalleyDAO::_returnGalleyFromRow', array(&$galley, &$row));
     return $galley;
 }