PluginProbe
CSS & JavaScript Toolbox / 8.3
CSS & JavaScript Toolbox v8.3
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 | models/package.php +14 -14 108.3 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2 /**
3 -*
3 +*
4 4 */
5 5
6 6 // Disllow direct access.
7 7 defined('ABSPATH') or die('Access denied');
@@ -7,17 +7,17 @@
7 7 defined('ABSPATH') or die('Access denied');
8 8
9 9 // Import dependencies.
10 10 cssJSToolbox::import('framework:db:mysql:xtable.inc.php');
11 -
11 +
12 12 /**
13 -*
13 +*
14 14 */
15 15 class CJTPackageModel extends CJTHookableClass {
16 16
17 17 /**
18 18 * put your comment there...
19 - *
19 + *
20 20 * @var mixed
21 21 */
22 22 protected $params = array();
23 23
@@ -22,14 +22,14 @@
22 22 protected $params = array();
23 23
24 24 /**
25 25 * Delete single package.
26 - *
26 + *
27 27 * This method is going to delete the package
28 28 * and all the templates and blocks associated to it,
29 29 * therefor it'll unlink/break-down the relationship
30 30 * between those templates and blocks.
31 - *
31 + *
32 32 * @param Integer Package Id.
33 33 * @return CJTPackageModel Return $this.
34 34 */
35 35 public function delete($id) {
@@ -35,10 +35,10 @@
35 35 public function delete($id) {
36 36 // Initialize.
37 37 $modelTemplates = CJTModel::getInstance('templates-manager');
38 38 $dbd = cssJSToolbox::getInstance()->getDBDriver();
39 - $assoObjectsQueryTmp = 'SELECT objectId
40 - FROM #__cjtoolbox_package_objects
39 + $assoObjectsQueryTmp = 'SELECT objectId
40 + FROM #__cjtoolbox_package_objects
41 41 WHERE packageId = %d AND objectType = "%s" AND relType = "%s";';
42 42 // Delete the package.
43 43 CJTxTable::getInstance('package')
44 44 ->set('id', $id)
@@ -64,9 +64,9 @@
64 64 }
65 65
66 66 /**
67 67 * put your comment there...
68 - *
68 + *
69 69 * @param mixed $packageName
70 70 */
71 71 public function exists($packageName) {
72 72 // Load by name.
@@ -78,9 +78,9 @@
78 78 }
79 79
80 80 /**
81 81 * put your comment there...
82 - *
82 + *
83 83 */
84 84 public function getFileContent() {
85 85 // Get package ID.
86 86 $packageId = $_REQUEST['packageId'];
@@ -96,9 +96,9 @@
96 96 }
97 97
98 98 /**
99 99 * put your comment there...
100 - *
100 + *
101 101 * @param mixed $name
102 102 */
103 103 public function getParam($name) {
104 104 return isset($this->params[$name]) ? $this->params[$name] : null;
@@ -105,9 +105,9 @@
105 105 }
106 106
107 107 /**
108 108 * put your comment there...
109 - *
109 + *
110 110 * @param mixed $package
111 111 */
112 112 public function save($package) {
113 113 // Add package.
@@ -114,12 +114,12 @@
114 114 return CJTxTable::getInstance('package')
115 115 ->setData($package)
116 116 ->save()->get('id');
117 117 }
118 -
118 +
119 119 /**
120 120 * put your comment there...
121 - *
121 + *
122 122 * @param mixed $name
123 123 * @param mixed $value
124 124 */
125 125 public function setParam($name, $value) {