Prado\Web\UI\WebControls\TRadioButton::getUniqueGroupName PHP Method

getUniqueGroupName() public method

public getUniqueGroupName ( ) : string
return string the name used to fetch radiobutton post data
    public function getUniqueGroupName()
    {
        if (($groupName = $this->getViewState('UniqueGroupName', '')) !== '') {
            return $groupName;
        } else {
            if (($uniqueID = $this->getUniqueID()) !== $this->_previousUniqueID || $this->_uniqueGroupName === null) {
                $groupName = $this->getGroupName();
                $this->_previousUniqueID = $uniqueID;
                if ($uniqueID !== '') {
                    if (($pos = strrpos($uniqueID, \Prado\Web\UI\TControl::ID_SEPARATOR)) !== false) {
                        if ($groupName !== '') {
                            $groupName = substr($uniqueID, 0, $pos + 1) . $groupName;
                        } else {
                            if ($this->getNamingContainer() instanceof TRadioButtonList) {
                                $groupName = substr($uniqueID, 0, $pos);
                            }
                        }
                    }
                    if ($groupName === '') {
                        $groupName = $uniqueID;
                    }
                }
                $this->_uniqueGroupName = $groupName;
            }
        }
        return $this->_uniqueGroupName;
    }