Prado\Web\UI\WebControls\TWebControl::getStyle PHP Method

getStyle() public method

public getStyle ( ) : TStyle
return TStyle the object representing the css style of the control
    public function getStyle()
    {
        if ($style = $this->getViewState('Style', null)) {
            return $style;
        } else {
            $style = $this->createStyle();
            $this->setViewState('Style', $style, null);
            return $style;
        }
    }

Usage Example

コード例 #1
0
ファイル: TRepeatInfo.php プロジェクト: pradosoft/prado
 /**
  * Renders the repeated items.
  * @param THtmlWriter writer for the rendering purpose
  * @param IRepeatInfoUser repeat information user
  */
 public function renderRepeater($writer, IRepeatInfoUser $user)
 {
     if ($this->_repeatLayout === TRepeatLayout::Table) {
         $control = new TTable();
         if ($this->_caption !== '') {
             $control->setCaption($this->_caption);
             $control->setCaptionAlign($this->_captionAlign);
         }
     } else {
         if ($this->_repeatLayout === TRepeatLayout::Raw) {
             $this->renderRawContents($writer, $user);
             return;
         } else {
             $control = new TWebControl();
         }
     }
     $control->setID($user->getClientID());
     $control->copyBaseAttributes($user);
     if ($user->getHasStyle()) {
         $control->getStyle()->copyFrom($user->getStyle());
     }
     $control->renderBeginTag($writer);
     $writer->writeLine();
     if ($this->_repeatDirection === TRepeatDirection::Vertical) {
         $this->renderVerticalContents($writer, $user);
     } else {
         $this->renderHorizontalContents($writer, $user);
     }
     $control->renderEndTag($writer);
 }
All Usage Examples Of Prado\Web\UI\WebControls\TWebControl::getStyle