QCalendar::GetControlHtml PHP 메소드

GetControlHtml() 공개 메소드

public GetControlHtml ( )
    public function GetControlHtml()
    {
        // Pull any Attributes
        $strAttributes = $this->GetAttributes();
        // Pull any styles
        if ($strStyle = $this->GetStyleAttributes()) {
            $strStyle = 'style="' . $strStyle . '"';
        }
        $strImageStyle = '';
        if (file_exists(__DOCROOT__ . $this->strCalendarImageSource)) {
            $strSizeInfo = getimagesize(__DOCROOT__ . $this->strCalendarImageSource);
            $strImageStyle = 'style="width: ' . $strSizeInfo[0] . 'px; height: ' . $strSizeInfo[1] . 'px;"';
        }
        $strToReturn = sprintf('<img id="%s" src="%s" %s/><div id="%s_cal" %s%s></div>', $this->strControlId, $this->strCalendarImageSource, $strImageStyle, $this->strControlId, $strAttributes, $strStyle);
        return $strToReturn;
    }