@@ 66-70 (lines=5) @@ | ||
63 | */ |
|
64 | public function setVar($key, $value) |
|
65 | { |
|
66 | if ($key === 'field_options' && is_array($value)) { |
|
67 | foreach (array_keys($value) as $idx) { |
|
68 | $value[$idx] = base64_encode($value[$idx]); |
|
69 | } |
|
70 | } |
|
71 | parent::setVar($key, $value); |
|
72 | } |
|
73 | ||
@@ 82-86 (lines=5) @@ | ||
79 | public function getVar($key, $format = 's') |
|
80 | { |
|
81 | $value = parent::getVar($key, $format); |
|
82 | if ($key === 'field_options' && !empty($value)) { |
|
83 | foreach (array_keys($value) as $idx) { |
|
84 | $value[$idx] = base64_decode($value[$idx]); |
|
85 | } |
|
86 | } |
|
87 | return $value; |
|
88 | } |
|
89 |