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

  • Hooks
  • Module
  • NonceLoginOperation
  • NonceLoginRequestOperation
  • NonceRequestForm
  • Ticket
  • TicketModel
 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\Users\NonceLogin;
13 
14 use ICanBoogie\Operation;
15 
16 use Brickrouge\Button;
17 use Brickrouge\Element;
18 use Brickrouge\Form;
19 use Brickrouge\Text;
20 
21 class NonceRequestForm extends Form
22 {
23     /**
24      * Adds the "widget.css" and "widget.js" assets.
25      *
26      * @param \Brickrouge\Document $document
27      */
28     static protected function add_assets(\Brickrouge\Document $document)
29     {
30         parent::add_assets($document);
31 
32         $document->css->add(DIR . 'public/widget.css');
33         $document->js->add(DIR . 'public/widget.js');
34     }
35 
36     public function __construct(array $attributes=array())
37     {
38         parent::__construct
39         (
40             $attributes + array
41             (
42                 Form::ACTIONS => new Button
43                 (
44                     'Send', array
45                     (
46                         'type' => 'submit',
47                         'class' => 'btn-warning'
48                     )
49                 ),
50 
51                 Form::RENDERER => 'Simple',
52 
53                 Form::HIDDENS => array
54                 (
55                     Operation::DESTINATION => 'users.noncelogin',
56                     Operation::NAME => 'nonce-login-request'
57                 ),
58 
59                 Element::CHILDREN => array
60                 (
61                     'email' => new Text
62                     (
63                         array
64                         (
65                             Form::LABEL => 'your_email',
66                             Element::REQUIRED => true
67                         )
68                     )
69                 ),
70 
71                 Element::WIDGET_CONSTRUCTOR => 'NonceRequest',
72 
73                 'class' => 'widget-nonce-request',
74                 'name' => 'users/nonce-request'
75             )
76         );
77     }
78 }
Autodoc API documentation generated by ApiGen 2.8.0