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;
 }