✏️ 正在编辑: FormCheckbox.php
路径:
/srv/systems_dir/biblioteca_yuppie/library/Bootstrap/View/Helper/FormCheckbox.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * View helper definition * * @category Forms * @package Bootstrap_View * @subpackage Helper * @author Jaime Neto <contato@jaimeneto.com> */ require_once 'Zend/View/Helper/FormCheckbox.php'; /** * Helper to generate a "checkbox" element with the Bootstrap UI. * * @category Forms * @package Bootstrap_View * @subpackage Helper * @author Jaime Neto <contato@jaimeneto.com> */ class Bootstrap_View_Helper_FormCheckbox extends Zend_View_Helper_FormCheckbox { public function formCheckbox($name, $value = null, $attribs = null, array $checkedOptions = null) { $inputLabel = isset($attribs['inputLabel']) ? $attribs['inputLabel'] : null; if (is_array($attribs)) { unset($attribs['inputLabel']); } $xhtml = parent::formCheckbox($name, $value, $attribs, $checkedOptions); if (!isset($attribs['escape']) || $attribs['escape']) { $inputLabel = $this->view->escape($inputLabel); } // Wraps the checkbox with its own label (not the decorator one), // if the attrib input_label is added if ($inputLabel) { $xhtml = '<label>' . $xhtml . $inputLabel . '</label>'; } return $xhtml; } }
💾 保存文件
← 返回文件管理器