NullFormatter.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Helper\Select\Formatter; |
| 4 | |
| 5 | use AC\Helper\Select; |
| 6 | |
| 7 | class NullFormatter extends Select\Formatter { |
| 8 | |
| 9 | public function __construct( Select\Entities $entities, Select\Value $value = null ) { |
| 10 | if ( null === $value ) { |
| 11 | $value = new Select\Value\NullFormatter(); |
| 12 | } |
| 13 | |
| 14 | parent::__construct( $entities, $value ); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * @param string $label |
| 19 | * |
| 20 | * @return string |
| 21 | */ |
| 22 | public function get_label( $label ) { |
| 23 | return $label; |
| 24 | } |
| 25 | |
| 26 | } |