| @@ 66-75 (lines=10) @@ | ||
| 63 | */ |
|
| 64 | abstract public function getValues(); |
|
| 65 | ||
| 66 | public function serialize($value) |
|
| 67 | { |
|
| 68 | foreach ($this->getConfig()->get('values') as $valueItem) { |
|
| 69 | if ($value === $valueItem['value']) { |
|
| 70 | return $valueItem['name']; |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | return null; |
|
| 75 | } |
|
| 76 | ||
| 77 | public function parseValue($value) |
|
| 78 | { |
|
| @@ 77-86 (lines=10) @@ | ||
| 74 | return null; |
|
| 75 | } |
|
| 76 | ||
| 77 | public function parseValue($value) |
|
| 78 | { |
|
| 79 | foreach ($this->getConfig()->get('values') as $valueItem) { |
|
| 80 | if ($value === $valueItem['name']) { |
|
| 81 | return $valueItem['value']; |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| 85 | return null; |
|
| 86 | } |
|
| 87 | ||
| 88 | public function parseInputValue($value) |
|
| 89 | { |
|
| @@ 88-97 (lines=10) @@ | ||
| 85 | return null; |
|
| 86 | } |
|
| 87 | ||
| 88 | public function parseInputValue($value) |
|
| 89 | { |
|
| 90 | foreach ($this->getConfig()->get('values') as $valueItem) { |
|
| 91 | if ($value === $valueItem['value']) { |
|
| 92 | return $valueItem['name']; |
|
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| 96 | return null; |
|
| 97 | } |
|
| 98 | ||
| 99 | } |
|
| 100 | ||