Beispiel #1
0
 /**
  * Returns the value
  *
  * @return mixed $value
  */
 public function getValue()
 {
     $value = $this->value;
     // if serialized, change to array
     if (Div::isJsonArray($this->value)) {
         // only if type multivalue or upload
         if ($this->getValueType() === 1 || $this->getValueType() === 3) {
             $value = json_decode($value);
         }
     }
     // if type date
     if ($this->getValueType() === 2 && is_numeric($value) && $this->getField() !== NULL) {
         $value = date(LocalizationUtility::translate('datepicker_format_' . $this->getField()->getDatepickerSettings(), 'powermail'), $value);
     }
     // if multitext or upload force array
     if (($this->getValueType() === 1 || $this->getValueType() === 3) && !is_array($value)) {
         $value = empty($value) ? array() : array(strval($value));
     }
     return $value;
 }
Beispiel #2
0
 /**
  * @return array
  */
 public function getMarketingPageFunnel()
 {
     if (\In2code\Powermail\Utility\Div::isJsonArray($this->marketingPageFunnel)) {
         return json_decode($this->marketingPageFunnel);
     }
     return (array) $this->marketingPageFunnel;
 }