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

  • Comment
  • ConfigBlock
  • ConfigOperation
  • DeleteBlock
  • DeleteOperation
  • EditBlock
  • Hooks
  • ManageBlock
  • Model
  • Module
  • PatchOperation
  • PreviewOperation
  • SaveOperation
  • SubmitForm
  • Update20131208
  • ViewProvider
  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\Comments;
 13 
 14 use Brickrouge\Element;
 15 use Brickrouge\Form;
 16 use Brickrouge\Text;
 17 
 18 /**
 19  * A block to edit comments.
 20  */
 21 class EditBlock extends \Icybee\EditBlock
 22 {
 23     protected function lazy_get_children()
 24     {
 25         $values = $this->values;
 26 
 27         return array
 28         (
 29             Comment::AUTHOR => new Text
 30             (
 31                 array
 32                 (
 33                     Form::LABEL => 'Author',
 34                     Element::REQUIRED => true
 35                 )
 36             ),
 37 
 38             Comment::AUTHOR_EMAIL => new Text
 39             (
 40                 array
 41                 (
 42                     Form::LABEL => 'E-mail',
 43                     Element::REQUIRED => true
 44                 )
 45             ),
 46 
 47             Comment::AUTHOR_URL => new Text
 48             (
 49                 array
 50                 (
 51                     Form::LABEL => 'URL'
 52                 )
 53             ),
 54 
 55             Comment::AUTHOR_IP => new Text
 56             (
 57                 array
 58                 (
 59                     Form::LABEL => 'Adresse IP',
 60 
 61                     'disabled' => true
 62                 )
 63             ),
 64 
 65             Comment::CONTENTS => new Element
 66             (
 67                 'textarea', array
 68                 (
 69                     Form::LABEL => 'Message',
 70                     Element::REQUIRED => true,
 71 
 72                     'rows' => 10
 73                 )
 74             ),
 75 
 76             Comment::NOTIFY => new Element
 77             (
 78                 Element::TYPE_RADIO_GROUP, array
 79                 (
 80                     Form::LABEL => 'Notification',
 81                     Element::DEFAULT_VALUE => 'no',
 82                     Element::REQUIRED => true,
 83                     Element::OPTIONS => array
 84                     (
 85                         'yes' => 'Bien sûr !',
 86                         'author' => "Seulement si c'est l'auteur du billet qui répond",
 87                         'no' => 'Pas la peine, je viens tous les jours',
 88                         'done' => 'Notification envoyée'
 89                     ),
 90 
 91                     Element::DESCRIPTION => (($values[Comment::NOTIFY] == 'done') ? "Un
 92                     message de notification a été envoyé." : null),
 93 
 94                     'class' => 'inputs-list'
 95                 )
 96             ),
 97 
 98             Comment::STATUS => new Element
 99             (
100                 'select', array
101                 (
102                     Form::LABEL => 'Status',
103                     Element::REQUIRED => true,
104                     Element::OPTIONS => array
105                     (
106                         null => '',
107                         'pending' => 'Pending',
108                         'approved' => 'Aprouvé',
109                         'spam' => 'Spam'
110                     )
111                 )
112             )
113         );
114     }
115 }
Autodoc API documentation generated by ApiGen 2.8.0