Source for file modifier.checkbox.php
Documentation is available at modifier.checkbox.php
* smarty modifier:チェックボックス用フィルタ
* <input type="checkbox" name="test" {""|checkbox}>
* <input type="checkbox" name="test" {"1"|checkbox}>
* <input type="checkbox" name="test">
* <input type="checkbox" name="test" checked="checked">
* @param string $string チェックボックスに渡されたフォーム値(スカラーのみ)
* @return string $stringが空文字列あるいは0, null, false 以外の場合は"checked"
if (is_scalar($string) &&
$string !=
"" &&
$string !=
"0") {
return 'checked="checked"';
Documentation generated on Fri, 11 Nov 2011 03:58:43 +0900 by phpDocumentor 1.4.3