| @@ 636-647 (lines=12) @@ | ||
| 633 | * @param $needle string |
|
| 634 | * @param $echo bool |
|
| 635 | */ |
|
| 636 | public function checked( $haystack = false, $needle = '', $echo = true ) { |
|
| 637 | $return = $this->itemd( $haystack,$needle, 'checked' ); |
|
| 638 | ||
| 639 | if ( '' !== $return ) { |
|
| 640 | if ( true === $echo ) { |
|
| 641 | // @codingStandardsIgnoreLine |
|
| 642 | echo $return; |
|
| 643 | } else { |
|
| 644 | return $return; |
|
| 645 | } |
|
| 646 | } |
|
| 647 | } |
|
| 648 | ||
| 649 | /** |
|
| 650 | * Checks to see if an item is checked. |
|
| @@ 656-667 (lines=12) @@ | ||
| 653 | * @param $needle string |
|
| 654 | * @param $echo bool |
|
| 655 | */ |
|
| 656 | public function selected( $haystack = false, $needle = '', $echo = true ) { |
|
| 657 | $return = $this->itemd( $haystack, $needle, 'selected' ); |
|
| 658 | ||
| 659 | if ( '' !== $return ) { |
|
| 660 | if ( true === $echo ) { |
|
| 661 | // @codingStandardsIgnoreLine |
|
| 662 | echo $return; |
|
| 663 | } else { |
|
| 664 | return $return; |
|
| 665 | } |
|
| 666 | } |
|
| 667 | } |
|
| 668 | ||
| 669 | /** |
|
| 670 | * Checks to see if an item is selected. If $echo is false, it will return the $type if conditions are true. |
|