/**
  * Returns the image tag, that includes the image resource (front controller action). The
  * tag definition also contains size and border instruction.
  *
  * @return string The image tag.
  *
  * @author Christian Achatz
  * @version
  * Version 0.1, 26.12.2008<br />
  */
 public function transform()
 {
     // setup the desired attributes
     $this->setAttribute('namespace', 'APF\\modules\\usermanagement\\pres\\icons');
     // execute the parent's onParseTime()
     parent::onParseTime();
     // resolve missing alt attribute
     $alt = $this->getAttribute('alt');
     if ($alt === null) {
         $this->setAttribute('alt', $this->getAttribute('title'));
     }
     // generate the image tag
     $imgSrc = parent::transform();
     $attributes = $this->getAttributesAsString($this->getAttributes(), ['alt', 'title']);
     return '<img src="' . $imgSrc . '" ' . $attributes . ' class="icon" />';
 }
 /**
  * Overwrites the parent's onParseTime().
  *
  * @author Ralf Schubert
  */
 public function onParseTime()
 {
     // setup the desired attribute to have more convenience
     $this->setAttribute('namespace', 'APF\\modules\\usermanagement\\pres\\icons');
     parent::onParseTime();
 }
 private function getMediaUrl($image)
 {
     $media = new MediaInclusionTag();
     $media->setAttribute('namespace', 'APF\\modules\\socialbookmark\\pres\\image');
     $media->setAttribute('filename', $image);
     $media->setContent($this->getContext());
     $media->setLanguage($this->getLanguage());
     $media->onParseTime();
     return $media->transform();
 }