Beispiel #1
0
 /**
  * Add a subdirectory of this extension as an asset dir.
  * @param Assets $assets Assets module.
  * @param string $path A relative path.
  */
 public function addAssetDir(Assets $assets, $path)
 {
     list($key, $path) = $this->getKeyPath($path);
     $assets->addAssetDir($key, $path);
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getIcon($icon, $size = 16)
 {
     $file = $this->assets->getAsset($this->dir . '/' . $icon . '.png');
     return '<img src="' . $file . '" alt="' . $icon . '" width="' . $size . '" height="' . $size . '" />';
 }