PluginProbe
CSS & JavaScript Toolbox / 8.0.2
CSS & JavaScript Toolbox v8.0.2
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
css-javascript-toolbox / models / block / assignmentpanel / auxiliarybase.php

auxiliarybase.php in CSS & JavaScript Toolbox 8.0.2, at models/block/assignmentpanel/auxiliarybase.php

92 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 /**
7 *
8 */
9 abstract class CJT_Models_Block_Assignmentpanel_Auxiliarybase
10 extends CJT_Models_Block_Assignmentpanel_Base {
11
12 /**
13 * put your comment there...
14 *
15 * @var mixed
16 */
17 protected $auxHelper = array();
18
19 /**
20 * put your comment there...
21 *
22 * @param mixed $offset
23 * @param mixed $iPerPage
24 * @param mixed $blockId
25 * @param mixed $typeParams
26 * @return CJT_Models_Block_Assignmentpanel_Auxiliarybase
27 */
28 public function __construct($offset, $iPerPage, $blockId, $typeParams) {
29 // Initialize.
30 $this->auxHelper = new CJT_Models_Block_Assignmentpanel_Helpers_Auxiliary();
31 // Initialize parent.
32 parent::__construct($offset, $iPerPage, $blockId, $typeParams);
33 }
34
35 /**
36 * put your comment there...
37 *
38 */
39 protected function getList() {
40 // Initialize.
41 $list = array();
42 $offset = $this->getOffset();
43 // Don't return items unless the offset is 0
44 // there is no paging for the aux items.
45 if (!$offset) {
46 $list = $this->auxHelper->getList();
47 }
48 // Returns
49 return $list;
50 }
51
52 /**
53 * put your comment there...
54 *
55 */
56 protected function isHierarchical() {
57 return false;
58 }
59
60 /**
61 * put your comment there...
62 *
63 */
64 protected function pinsMap() {
65 // Initialize.
66 $map = array();
67 $mdlBlocks = new CJTBlocksModel();
68 $blockId = $this->getBlockId();
69 // Query block pinPoint field.
70 $assignedPinPoints = $mdlBlocks->getBlock($blockId, array(), array('id', 'pinPoint'), false)->pinPoint;
71 // Return map.
72 return $this->auxHelper->getPinsArray($assignedPinPoints);
73 }
74
75 /**
76 * put your comment there...
77 *
78 * @param mixed $key
79 * @param mixed $item
80 */
81 protected function prepareItem($key, & $item) {
82 // Get the title.
83 $title = $item;
84 // Create an item array.
85 $item = array();
86 $item['parent'] = 0;
87 $item['id'] = dechex($key);
88 $item['title'] = $title;
89 }
90
91 } // End class.
92