Exemple #1
0
 /**
  * Translate the value with the description
  * @param string $value The value to translate
  * @return string
  */
 public function getDescription($value)
 {
     if (!$this->data) {
         return $value;
     } else {
         $row = $this->data->getPkRow($value);
         if (is_array($row)) {
             if (isset($row[$this->data_description_field])) {
                 return $row[$this->data_description_field];
             } else {
                 return null;
             }
         } else {
             return $value;
         }
     }
 }