Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • ConfigBlock
  • ConfigOperation
  • DeleteOperation
  • DownloadOperation
  • EditBlock
  • File
  • FileUpload
  • GetOperation
  • ManageBlock
  • Model
  • Module
  • SaveOperation
  • UploadOperation
 1 <?php
 2 
 3 /*
 4  * This file is part of the Icybee package.
 5  *
 6  * (c) Olivier Laviale <olivier.laviale@gmail.com>
 7  *
 8  * For the full copyright and license information, please view the LICENSE
 9  * file that was distributed with this source code.
10  */
11 
12 namespace Icybee\Modules\Files;
13 
14 use ICanBoogie\I18n;
15 use ICanBoogie\Uploaded;
16 
17 use Brickrouge\Element;
18 
19 class FileUpload extends \Brickrouge\File
20 {
21     protected function infos()
22     {
23         $path = $this['value'];
24         $details = $this->details($path);
25         $preview = $this->preview($path);
26 
27         $rc = '';
28 
29         if ($preview)
30         {
31             $rc .= '<div class="preview">';
32             $rc .= $preview;
33             $rc .= '</div>';
34         }
35 
36         if ($details)
37         {
38             $rc .= '<ul class="details">';
39 
40             foreach ($details as $detail)
41             {
42                 $rc .= '<li>' . $detail . '</li>';
43             }
44 
45             $rc .= '</ul>';
46         }
47 
48         return $rc;
49     }
50 
51     protected function preview($path)
52     {
53         $rc = '<a class="icon-download-alt" href="' . $path . '" title="' . I18n\t('download', array(), array('scope' => array('fileupload', 'element'))) . '"></a>';
54 
55         return $rc;
56     }
57 }
Autodoc API documentation generated by ApiGen 2.8.0