File indexing completed on 2024-12-22 05:37:13
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_View 0017 * @subpackage Helper 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 0024 /** Zend_View_Helper_FormRadio */ 0025 // require_once 'Zend/View/Helper/FormRadio.php'; 0026 0027 0028 /** 0029 * Helper to generate a set of checkbox button elements 0030 * 0031 * @category Zend 0032 * @package Zend_View 0033 * @subpackage Helper 0034 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0035 * @license http://framework.zend.com/license/new-bsd New BSD License 0036 */ 0037 class Zend_View_Helper_FormMultiCheckbox extends Zend_View_Helper_FormRadio 0038 { 0039 /** 0040 * Input type to use 0041 * @var string 0042 */ 0043 protected $_inputType = 'checkbox'; 0044 0045 /** 0046 * Whether or not this element represents an array collection by default 0047 * @var bool 0048 */ 0049 protected $_isArray = true; 0050 0051 /** 0052 * Generates a set of checkbox button elements. 0053 * 0054 * @access public 0055 * 0056 * @param string|array $name If a string, the element name. If an 0057 * array, all other parameters are ignored, and the array elements 0058 * are extracted in place of added parameters. 0059 * 0060 * @param mixed $value The checkbox value to mark as 'checked'. 0061 * 0062 * @param array $options An array of key-value pairs where the array 0063 * key is the checkbox value, and the array value is the radio text. 0064 * 0065 * @param array|string $attribs Attributes added to each radio. 0066 * 0067 * @return string The radio buttons XHTML. 0068 */ 0069 public function formMultiCheckbox($name, $value = null, $attribs = null, 0070 $options = null, $listsep = "<br />\n") 0071 { 0072 return $this->formRadio($name, $value, $attribs, $options, $listsep); 0073 } 0074 }