Changeset 3814

Show
Ignore:
Timestamp:
02/26/07 01:08:48 (5 years ago)
Author:
gregmac
Message:

Patch to HTML_QuickForm to add HTML_QuickForm_group::getElement() to get an element by name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/quickform/amp_conf/htdocs/admin/common/HTML/QuickForm/group.php

    r3578 r3814  
    254254 
    255255    // }}} 
     256    // {{{ getElement() 
     257 
     258    /** 
     259     * Gets a particular element by name 
     260     * 
     261     * @since     2.4 
     262     * @access    public 
     263     * @return    array 
     264     */ 
     265    function &getElement($name) 
     266    { 
     267        $this->_createElementsIfNotExist(); 
     268        foreach (array_keys($this->_elements) as $key) { 
     269            if (isset($this->_elements[$key]->_attributes['name']) && ($this->_elements[$key]->_attributes['name'] == $name)) { 
     270                return $this->_elements[$key]; 
     271            } 
     272        } 
     273        return false; 
     274    } // end func getElements 
     275 
     276    // }}} 
    256277    // {{{ getGroupType() 
    257278