コード例 #1
0
ファイル: bio.php プロジェクト: bashrc/gnusocial-debian
 function showContent()
 {
     if (empty($this->profile)) {
         return;
     }
     $profilelistitem = new ProfileListItem($this->profile, $this);
     $profilelistitem->show();
     $this->elementStart('ul');
     $fields = GNUsocialProfileExtensionField::allFields();
     foreach ($fields as $field) {
         $fieldname = $field->systemname;
         if (!empty($this->profile->{$fieldname})) {
             $this->elementStart('li', array('class' => 'biolistitem'));
             $this->elementStart('div', array('class' => 'biolistitemcontainer'));
             if ($field->type == 'text') {
                 $this->element('h3', array(), $field->title);
                 $this->element('p', array('class' => 'biovalue'), $this->profile->{$fieldname});
             } else {
                 $this->element('span', array('class' => 'biotitle'), $field->title);
                 $this->text(' ');
                 $this->element('span', array('class' => 'biovalue'), $this->profile->{$fieldname});
             }
             $this->elementEnd('div');
             $this->elementEnd('li');
         }
     }
     $this->elementEnd('ul');
 }