@@ 113-120 (lines=8) @@ | ||
110 | * |
|
111 | * @return boolean |
|
112 | */ |
|
113 | public function hasFieldConfigValue($field, $value) |
|
114 | { |
|
115 | if (null === $values = $this->getFieldConfig($field)) { |
|
116 | return false; |
|
117 | } |
|
118 | ||
119 | return false !== array_search($value, $values); |
|
120 | } |
|
121 | ||
122 | /** |
|
123 | * Returns the name for a field config value |
|
@@ 147-154 (lines=8) @@ | ||
144 | * |
|
145 | * @return integer|null |
|
146 | */ |
|
147 | public function getFieldConfigKey($config, $value) |
|
148 | { |
|
149 | if (null === $values = $this->getFieldConfig($config)) { |
|
150 | return null; |
|
151 | } |
|
152 | ||
153 | return array_search($value, $values); |
|
154 | } |
|
155 | } |
|
156 |