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

  • CloudElement
  • DeleteBlock
  • DeleteOperation
  • EditBlock
  • Hooks
  • ManageBlock
  • Model
  • Module
  • OrderOperation
  • SaveOperation
  • Vocabulary
 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\Vocabulary;
13 
14 use ICanBoogie\I18n;
15 use ICanBoogie\Operation;
16 
17 class Module extends \Icybee\Module
18 {
19     const OPERATION_ORDER = 'order';
20 
21     protected function block_order($vid)
22     {
23         global $core;
24 
25         $document = $core->document;
26 
27         $document->js->add(DIR . 'public/order.js');
28         $document->css->add(DIR . 'public/order.css');
29 
30         $terms = $core->models['taxonomy.terms']->filter_by_vid($vid)->order('term.weight, vtid')->all;
31 
32         $rc  = '<form id="taxonomy-order" method="post">';
33         $rc .= '<input type="hidden" name="' . Operation::NAME . '" value="' . self::OPERATION_ORDER . '" />';
34         $rc .= '<input type="hidden" name="' . Operation::DESTINATION . '" value="' . $this . '" />';
35         $rc .= '<input type="hidden" name="' . Operation::KEY . '" value="' . $vid . '" />';
36         $rc .= '<ol>';
37 
38         foreach ($terms as $term)
39         {
40             $rc .= '<li>';
41             $rc .= '<input type="hidden" name="terms[' . $term->vtid . ']" value="' . $term->weight . '" />';
42             $rc .= \ICanBoogie\escape($term->term);
43             $rc .= '</li>';
44         }
45 
46         $rc .= '</ol>';
47 
48         $rc .= '<div class="actions">';
49         $rc .= '<button class="save">' . I18n\t('label.save') . '</button>';
50         $rc .= '</div>';
51 
52         $rc .= '</form>';
53 
54         return $rc;
55     }
56 }
Autodoc API documentation generated by ApiGen 2.8.0