| @@ 708-720 (lines=13) @@ | ||
| 705 | public function getSmartyConditions($condition = '', $operator = '', $type = '', $contentIf = '', $contentElse = false, $count = false, $noSimbol = false) |
|
| 706 | { |
|
| 707 | if (!$contentElse) { |
|
| 708 | if (!$count) { |
|
| 709 | $ret = "<{if \${$condition}{$operator}{$type}}>\n"; |
|
| 710 | } elseif (!$noSimbol) { |
|
| 711 | $ret = "<{if {$condition}{$operator}{$type}}>\n"; |
|
| 712 | } else { |
|
| 713 | $ret = "<{if count(\${$condition}){$operator}{$type}}>\n"; |
|
| 714 | } |
|
| 715 | $ret .= "\t{$contentIf}\n"; |
|
| 716 | $ret .= "<{/if}>\n"; |
|
| 717 | } else { |
|
| 718 | if (!$count) { |
|
| 719 | $ret = "<{if \${$condition}{$operator}{$type}}>\n"; |
|
| 720 | } elseif (!$noSimbol) { |
|
| 721 | $ret = "<{if {$condition}{$operator}{$type}}>\n"; |
|
| 722 | } else { |
|
| 723 | $ret = "<{if count(\${$condition}){$operator}{$type}}>\n"; |
|
| @@ 718-730 (lines=13) @@ | ||
| 715 | $ret .= "\t{$contentIf}\n"; |
|
| 716 | $ret .= "<{/if}>\n"; |
|
| 717 | } else { |
|
| 718 | if (!$count) { |
|
| 719 | $ret = "<{if \${$condition}{$operator}{$type}}>\n"; |
|
| 720 | } elseif (!$noSimbol) { |
|
| 721 | $ret = "<{if {$condition}{$operator}{$type}}>\n"; |
|
| 722 | } else { |
|
| 723 | $ret = "<{if count(\${$condition}){$operator}{$type}}>\n"; |
|
| 724 | } |
|
| 725 | $ret .= "\t{$contentIf}\n"; |
|
| 726 | $ret .= "<{else}>\n"; |
|
| 727 | $ret .= "\t{$contentElse}\n"; |
|
| 728 | $ret .= "<{/if}>\n"; |
|
| 729 | } |
|
| 730 | ||
| 731 | return $ret; |
|
| 732 | } |
|
| 733 | ||