PluginProbe
CSS & JavaScript Toolbox / 11.7
CSS & JavaScript Toolbox v11.7
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
← All changes | controllers/block.php +57 -0 1011.7 View file →
@@ -36,8 +36,10 @@
36 36 $this->registryAction('getAPOP');
37 37 $this->registryAction('loadUrl');
38 38 $this->registryAction('getCode');
39 39 $this->registryAction('downloadCodeFile');
40 + $this->registryAction('getAllAssignment');
41 + $this->registryAction('getCodeFilesCount');
40 42 }
41 43
42 44 /**
43 45 * put your comment there...
@@ -74,8 +76,37 @@
74 76 // Output code.
75 77 $this->response = $codeFile->code;
76 78 }
77 79
80 +
81 + /**
82 + * put your comment there...
83 + *
84 + */
85 + public function getAllAssignmentAction() {
86 +
87 + $blockId = isset($_GET['blockId']) ? $_GET['blockId'] : null;
88 +
89 + try {
90 +
91 + if (!$blockId) {
92 +
93 + throw new Exception('Invalid Request parameters');
94 + }
95 +
96 + $blocks = new CJTBlocksModel();
97 +
98 + $block = $blocks->getBlock($blockId);
99 +
100 + $this->response = count(CJTBlocksModel::getAllAssignments($block));
101 + }
102 + catch (Exception $exception) {
103 +
104 +
105 + }
106 +
107 + }
108 +
78 109 /**
79 110 * Query single block based on the provided criteria!
80 111 *
81 112 */
@@ -88,8 +119,34 @@
88 119 // Query Block.
89 120 $this->response = array_intersect_key((array) $this->model->getBlockBy(), $returns);
90 121 }
91 122
123 + /**
124 + * put your comment there...
125 + *
126 + */
127 + protected function getCodeFilesCountAction() {
128 +
129 +
130 + $blockId = isset($_GET['blockId']) ? $_GET['blockId'] : null;
131 +
132 + try {
133 +
134 + if (!$blockId) {
135 +
136 + throw new Exception('Invalid Request parameters');
137 + }
138 +
139 + $this->response = count(CJTBlocksModel::getCodeFilesCount($blockId));
140 + }
141 + catch (Exception $exception) {
142 +
143 +
144 + }
145 +
146 +
147 + }
148 +
92 149 /**
93 150 * Get assigment panel objects page.
94 151 *
95 152 */