コード例 #1
0
 public function render($value)
 {
     $value = parent::render($value);
     if ($this->options['decimals']) {
         $value = gmGeneratorRounder::round($value, $this->options['decimals']);
     }
     return (double) parent::render($value);
 }
コード例 #2
0
 public function render($value)
 {
     $value = parent::render($value);
     if (!is_null($this->options['dateFormat'])) {
         $value = date($this->options['dateFormat'], strtotime($value));
     }
     return $value;
 }
コード例 #3
0
 public function render($value)
 {
     $value = strval(parent::render($value));
     if ($this->options['truncateTo'] != -1 && strlen($value) > $this->options['truncateTo']) {
         $value = substr($value, 0, $this->options['truncateTo'] - 3);
         $value .= '...';
     }
     if ($this->options['capitalize']) {
         $value = ucfirst(strtolower($value));
     }
     if ($this->options['uppercase']) {
         $value = strtoupper($value);
     }
     if ($this->options['lowercase']) {
         $value = strtolower($value);
     }
     return $value;
 }
コード例 #4
0
 protected function getItemDecorator()
 {
     $options = array_merge($this->options['itemDecoratorOptions'], array('decorator' => $this->options['itemDecorator']));
     $decorator = gmExporterFieldDecorator::getInstance($options);
     return $decorator;
 }
コード例 #5
0
 public function render($value)
 {
     $value = parent::render($value);
     return $value ? $this->translate($this->options['trueRepresentation']) : $this->translate($this->options['falseRepresentation']);
 }
コード例 #6
0
 /**
  * Use this to get an abstraction of the user's field configuration 
  *
  * @return an array of gmExporterFieldDecorators
  */
 protected function getFieldSelection()
 {
     $fields = array();
     foreach ($this->getConfiguration()->getExportationFieldSelection() as $field) {
         $fields[] = gmExporterFieldDecorator::getInstance($field, $this->getContext());
     }
     return $fields;
 }
コード例 #7
0
 public function render($value)
 {
     $value = parent::render($value);
     return (int) parent::render($value);
 }
コード例 #8
0
 public function render($value)
 {
     return parent::render($value);
 }