setImageAlign() 공개 메소드

Possible values include: absbottom, absmiddle, baseline, bottom, left, middle, right, texttop, and top. If an empty string is passed in, imagealign attribute will not be rendered.
public setImageAlign ( $value )
예제 #1
0
 /**
  * Sets the alignment of the image with respective to other elements on the page.
  * Possible values include: absbottom, absmiddle, baseline, bottom, left,
  * middle, right, texttop, and top. If an empty string is passed in,
  * imagealign attribute will not be rendered.
  * @param string the alignment of the image
  */
 public function setImageAlign($value)
 {
     if (parent::getImageAlign() === $value) {
         return;
     }
     parent::setImageAlign($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value);
     }
 }
예제 #2
0
 /**
  * Gets the TImage for rendering the ImageUrl property. This is not for
  * creating dynamic images.
  * @param string image url.
  * @return TImage image control for rendering.
  */
 protected function createImage($imageUrl)
 {
     $image = new TImage();
     $image->setImageUrl($imageUrl);
     if (($width = $this->getImageWidth()) !== '') {
         $image->setWidth($width);
     }
     if (($height = $this->getImageHeight()) !== '') {
         $image->setHeight($height);
     }
     if (($toolTip = $this->getToolTip()) !== '') {
         $image->setToolTip($toolTip);
     }
     if (($text = $this->getText()) !== '') {
         $image->setAlternateText($text);
     }
     if (($align = $this->getImageAlign()) !== '') {
         $image->setImageAlign($align);
     }
     $image->setBorderWidth('0');
     return $image;
 }