示例#1
0
 public function getText($value)
 {
     static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs');
     $jobs = array();
     foreach ($value as $id => $job) {
         $address = Address::formArrayToString(array($job['w_address']));
         $phones = Phone::formArrayToString($job['w_phone']);
         $jobs[$id] = $job['name'];
         $jobs[$id] .= $job['description'] ? ', ' . $job['description'] : '';
         $jobs[$id] .= ' (affichage ' . $pubs[$job['pub']];
         if (count($job['terms'])) {
             $terms = array();
             foreach ($job['terms'] as $term) {
                 $terms[] = $term['full_name'];
             }
             $jobs[$id] .= ', mots-clefs : ' . implode(', ', $terms);
         }
         if ($job['w_url']) {
             $jobs[$id] .= ', page perso : ' . $job['w_url'];
         }
         if ($address) {
             $jobs[$id] .= ', adresse : ' . $address;
         }
         if ($job['w_email']) {
             $jobs[$id] .= ', email : ' . $job['w_email'];
         }
         if ($phones) {
             $jobs[$id] .= ', téléphones : ' . $phones;
         }
         $jobs[$id] .= ')';
     }
     return implode(' ; ', $jobs);
 }
示例#2
0
文件: address.php 项目: Ekleog/platal
 private function toString()
 {
     $address = $this->text;
     if ($this->type == self::LINK_PROFILE || $this->type == self::LINK_JOB) {
         static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs');
         $address .= ' (affichage ' . $pubs[$this->pub];
     }
     if ($this->type == self::LINK_PROFILE) {
         static $flags = array('current' => 'actuelle', 'temporary' => 'temporaire', 'secondary' => 'secondaire', 'mail' => 'conctactable par courier', 'deliveryIssue' => 'n\'habite pas à l\'adresse indiquée', 'cedex' => 'type cédex');
         if (!$this->flags->hasFlag('temporary')) {
             $address .= ', permanente';
         }
         if (!$this->flags->hasFlag('secondary')) {
             $address .= ', principale';
         }
         foreach ($flags as $flag => $flagName) {
             if ($this->flags->hasFlag($flag)) {
                 $address .= ', ' . $flagName;
             }
         }
         if ($this->comment) {
             $address .= ', commentaire : ' . $this->comment;
         }
         if ($phones = Phone::formArrayToString($this->phones)) {
             $address .= ', ' . $phones;
         }
     } elseif ($this->type == self::LINK_JOB) {
         $address .= ')';
     }
     return $address;
 }
示例#3
0
 public function getText($value)
 {
     return Phone::formArrayToString($value);
 }