web/lib/Zend/Form/Element/MultiCheckbox.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Form
    16  * @package    Zend_Form
    17  * @subpackage Element
    17  * @subpackage Element
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  */
    20  */
    21 
    21 
    22 /** Zend_Form_Element_Multi */
    22 /** Zend_Form_Element_Multi */
    23 require_once 'Zend/Form/Element/Multi.php';
    23 require_once 'Zend/Form/Element/Multi.php';
    30  * checkboxes selected.
    30  * checkboxes selected.
    31  *
    31  *
    32  * @category   Zend
    32  * @category   Zend
    33  * @package    Zend_Form
    33  * @package    Zend_Form
    34  * @subpackage Element
    34  * @subpackage Element
    35  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    35  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    36  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    36  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    37  * @version    $Id: MultiCheckbox.php 20096 2010-01-06 02:05:09Z bkarwin $
    37  * @version    $Id: MultiCheckbox.php 24963 2012-06-15 14:32:23Z adamlundrigan $
    38  */
    38  */
    39 class Zend_Form_Element_MultiCheckbox extends Zend_Form_Element_Multi
    39 class Zend_Form_Element_MultiCheckbox extends Zend_Form_Element_Multi
    40 {
    40 {
    41     /**
    41     /**
    42      * Use formMultiCheckbox view helper by default
    42      * Use formMultiCheckbox view helper by default
    47     /**
    47     /**
    48      * MultiCheckbox is an array of values by default
    48      * MultiCheckbox is an array of values by default
    49      * @var bool
    49      * @var bool
    50      */
    50      */
    51     protected $_isArray = true;
    51     protected $_isArray = true;
       
    52 
       
    53     /**
       
    54      * Load default decorators
       
    55      *
       
    56      * @return Zend_Form_Element_MultiCheckbox
       
    57      */
       
    58     public function loadDefaultDecorators()
       
    59     {
       
    60         if ($this->loadDefaultDecoratorsIsDisabled()) {
       
    61             return $this;
       
    62         }
       
    63 
       
    64         parent::loadDefaultDecorators();
       
    65 
       
    66         // Disable 'for' attribute
       
    67         if (false !== $decorator = $this->getDecorator('label')) {
       
    68             $decorator->setOption('disableFor', true);
       
    69         }
       
    70 
       
    71         return $this;
       
    72     }
    52 }
    73 }