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

  • DeleteBlock
  • DeleteOperation
  • EditBlock
  • Hooks
  • ManageBlock
  • Model
  • Module
  • SaveOperation
  • Term
 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\Taxonomy\Terms;
13 
14 use Brickrouge\Element;
15 use Brickrouge\Form;
16 use Brickrouge\Widget;
17 
18 use Icybee\Modules\Nodes\TitleSlugCombo;
19 
20 class EditBlock extends \Icybee\EditBlock
21 {
22     protected function lazy_get_children()
23     {
24         global $core;
25 
26         $vid_options = array(null => '') + $core->models['taxonomy.vocabulary']->select('vid, vocabulary')->pairs;
27 
28         /*
29          * Beware of the 'weight' property, because vocabulary also define 'weight' and will
30          * override the term's one.
31          */
32 
33         return array_merge
34         (
35             parent::lazy_get_children(), array
36             (
37                 Term::TERM => new TitleSlugCombo
38                 (
39                     array
40                     (
41                         Form::LABEL => 'Term',
42                         Element::REQUIRED => true
43                     )
44                 ),
45 
46                 Term::VID => new Element
47                 (
48                     'select', array
49                     (
50                         Form::LABEL => 'Vocabulary',
51                         Element::OPTIONS => $vid_options,
52                         Element::REQUIRED => true
53                     )
54                 )
55             )
56         );
57     }
58 }
59 
Autodoc API documentation generated by ApiGen 2.8.0