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

  • ContactForm
  • DefaultsOperation
  • EditBlock
  • EmailComposer
  • Form
  • FormEditor
  • FormEditorElement
  • Hooks
  • ManageBlock
  • Model
  • Module
  • NotifyParams
  • PopForm
  • PostOperation
  • PressContactForm
  • QuickContactForm

Interfaces

  • AlterNotify
 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\Forms;
13 
14 use ICanBoogie\Core;
15 
16 /**
17  * "Form" editor.
18  */
19 class FormEditor implements \Icybee\Modules\Editor\Editor
20 {
21     /**
22      * Returns content as is.
23      *
24      * @see Icybee\Modules\Editor.Editor::serialize()
25      */
26     public function serialize($content)
27     {
28         return $content;
29     }
30 
31     /**
32      * Returns serialized content as is.
33      *
34      * @see Icybee\Modules\Editor.Editor::unserialize()
35      */
36     public function unserialize($serialized_content)
37     {
38         return $serialized_content;
39     }
40     /**
41      * @return FormEditorElement
42      *
43      * @see Icybee\Modules\Editor.Editor::from()
44      */
45     public function from(array $attributes)
46     {
47         return new FormEditorElement($attributes);
48     }
49 
50     /**
51      * Returns a _Form_ active record.
52      *
53      * @return Icybee\Modules\Forms\Form
54      *
55      * @see Icybee\Modules\Editor.Editor::render()
56      */
57     public function render($content)
58     {
59         return $content ? Core::get()->models['forms'][$content] : null;
60     }
61 }
Autodoc API documentation generated by ApiGen 2.8.0