Prado\Web\UI\WebControls\TPanelStyle::copyFrom PHP Method

copyFrom() public method

If a style field is set in the new style, the corresponding field in this style will be overwritten.
public copyFrom ( $style )
    public function copyFrom($style)
    {
        parent::copyFrom($style);
        if ($style instanceof TPanelStyle) {
            if ($style->_backImageUrl !== null) {
                $this->_backImageUrl = $style->_backImageUrl;
            }
            if ($style->_direction !== null) {
                $this->_direction = $style->_direction;
            }
            if ($style->_horizontalAlign !== null) {
                $this->_horizontalAlign = $style->_horizontalAlign;
            }
            if ($style->_scrollBars !== null) {
                $this->_scrollBars = $style->_scrollBars;
            }
            if ($style->_wrap !== null) {
                $this->_wrap = $style->_wrap;
            }
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Copies the fields in a new style to this style.
  * If a style field is set in the new style, the corresponding field
  * in this style will be overwritten.
  * @param TStyle the new style
  */
 public function copyFrom($style)
 {
     parent::copyFrom($style);
     if ($style instanceof TDataGridPagerStyle) {
         if ($style->_visible !== null) {
             $this->_visible = $style->_visible;
         }
         if ($style->_position !== null) {
             $this->_position = $style->_position;
         }
         if ($style->_buttonCount !== null) {
             $this->_buttonCount = $style->_buttonCount;
         }
         if ($style->_prevText !== null) {
             $this->_prevText = $style->_prevText;
         }
         if ($style->_nextText !== null) {
             $this->_nextText = $style->_nextText;
         }
         if ($style->_mode !== null) {
             $this->_mode = $style->_mode;
         }
         if ($style->_buttonType !== null) {
             $this->_buttonType = $style->_buttonType;
         }
     }
 }