| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class T3Status implements \Aimeos\Base\Criteria\Plugin\Iface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Translates the MShop value into its TYPO3 equivalent. |
||
| 25 | * |
||
| 26 | * @param integer $value Status value |
||
| 27 | * @param mixed $type Expected value type |
||
| 28 | * @return integer Value for TYPO3 "disabled" field |
||
| 29 | */ |
||
| 30 | public function translate( $value, $type = null ) |
||
| 31 | { |
||
| 32 | return ( $value == 1 ? 0 : 1 ); |
||
| 33 | } |
||
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * Reverses the translation from the TYPO3 value to the MShop constant. |
||
| 38 | * |
||
| 39 | * @param integer $value Value for TYPO3 "disabled" field |
||
| 40 | * @param mixed $type Expected value type |
||
| 41 | * @return integer Status value |
||
| 42 | */ |
||
| 43 | public function reverse( $value, $type = null ) |
||
| 46 | } |
||
| 47 | } |
||
| 48 |