Exemple #1
0
 function display($display_type = null)
 {
     if ($this->getFileName() && !isset($this->_image)) {
         $this->_default_display = 'ArticleDocumentLink_Display';
     }
     return parent::display($display_type);
 }
Exemple #2
0
 function _addFileLink($data, $fieldname)
 {
     if (!(isset($data[$fieldname]) && $data[$fieldname])) {
         return null;
     }
     require_once 'AMP/Content/Article/DocumentLink.inc.php';
     $fileLink = new DocumentLink($data[$fieldname]);
     if (strpos($this->fields[$fieldname]['label'], $data[$fieldname]) === FALSE) {
         $this->setFieldLabel($fieldname, $this->fields[$fieldname]['label'] . $fileLink->display('div'));
     }
     $this->form->setDefaults(array($fieldname . '_value' => $data[$fieldname]));
 }