Example #1
0
<div class="attached-file well shd">
    <?php 
$file = new File($file->path, $file);
?>
    <?php 
echo $file->render();
?>
    <a href="<?php 
echo $file->getLink('delete');
?>
" class="sh" title="<?php 
echo t('Удалить');
?>
"><i class="icon-remove"></i></a>
    <a href="#" class="sh" title="<?php 
echo t('Вставить');
?>
"><i class="icon-upload"></i></a>
</div>
Example #2
0
 /**
  * Format the tool path
  *
  * @param File $file
  *
  * @return string
  */
 public function getLink(File $file)
 {
     return $file->getLink('tool', $this->stripPrefix($this->class));
 }
Example #3
0
 /**
  * Converts the code to HTML
  *
  * @param File        $file File to render
  * @param Tool_Result $res  Tool result to integrate
  *
  * @return string HTML
  */
 public function toHtml(File $file, Tool_Result $res = null)
 {
     return '<div class="image">' . '<img' . ' src="' . htmlspecialchars($file->getLink('raw')) . '"' . ' alt="' . htmlspecialchars($file->getFilename()) . '"' . '/>' . '</div>';
 }