Esempio n. 1
0
 public function add_links()
 {
     $fields = ArtefactTypeContactinformation::get_profile_fields();
     foreach ($fields as $f) {
         try {
             ${$f} = artefact_instance_from_type($f, $this->artefact->get('owner'));
             $this->add_artefact_link(${$f}, 'has_part');
         } catch (MaharaException $e) {
         }
         // might not exist which is ok
     }
 }
Esempio n. 2
0
 public function render_self($options)
 {
     $smarty = smarty_core();
     $fields = ArtefactTypeContactinformation::get_profile_fields();
     foreach ($fields as $f) {
         try {
             ${$f} = artefact_instance_from_type($f, $this->get('owner'));
             $rendered = ${$f}->render_self(array());
             $smarty->assign($f, $rendered['html']);
             $smarty->assign('hascontent', true);
         } catch (Exception $e) {
         }
     }
     $this->render_license($options, $smarty);
     return array('html' => $smarty->fetch('artefact:resume:fragments/contactinformation.tpl'));
 }
Esempio n. 3
0
 public function render_self($options)
 {
     $smarty = smarty_core();
     $fields = ArtefactTypeContactinformation::get_profile_fields();
     foreach ($fields as $f) {
         try {
             ${$f} = artefact_instance_from_type($f, $this->get('owner'));
             $rendered = ${$f}->render_self(array());
             $smarty->assign($f, format_whitespace($rendered['html']));
             $smarty->assign('hascontent', true);
         } catch (Exception $e) {
         }
     }
     $template = 'artefact:resume:fragments/contactinformation.';
     if (!empty($options['editing'])) {
         $template .= 'editing.';
     }
     $template .= 'tpl';
     return array('html' => $smarty->fetch($template));
 }