PluginProbe
CSS & JavaScript Toolbox / 8.0.3
CSS & JavaScript Toolbox v8.0.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
css-javascript-toolbox / models / package / xml / definition / fragpackage.php

fragpackage.php in CSS & JavaScript Toolbox 8.0.3, at models/package/xml/definition/fragpackage.php

70 lines 1.3 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_Package_Xml_Definition_FragPackage
10 extends CJT_Models_Package_Xml_Definition_Abstract {
11
12 /**
13 * put your comment there...
14 *
15 * @var mixed
16 */
17 protected $objectIdKeyName;
18
19 /**
20 * put your comment there...
21 *
22 * @var mixed
23 */
24 protected $objectTypeName;
25
26 /**
27 * put your comment there...
28 *
29 * @var mixed
30 */
31 protected $relationTypeName;
32
33 /**
34 * put your comment there...
35 *
36 * @param mixed $tblPackage
37 * @param mixed $packageId
38 */
39 protected function save(CJTxTable & $tblPckObjects, $packageId) {
40 // Initialize.
41 $register =& $this->register();
42 // Save Package object ref
43 $tblPckObjects->setData(array(
44 'packageId' => $packageId,
45 'objectId' => $register[$this->objectIdKeyName],
46 'objectType' => $this->objectTypeName,
47 'relType' => $this->relationTypeName,
48 ))->save();
49 // Chain/
50 return $this;
51 }
52 /**
53 * Do nothing!
54 *
55 */
56 public function transit() {
57 // Initialize.
58 $tblPckObjects = CJTxTable::getInstance('package-objects');
59 // Query package id.
60 $tblPck = CJTxTable::getInstance('package');
61 $pckData = new CJT_Framework_Xml_Fetchscalars($this->getNode());
62 $tblPck->setData($pckData)
63 ->load(array('name'));
64 // Add Block-Template-Link=>Package reference.
65 $this->save($tblPckObjects, $tblPck->get('id'));
66 // Chain.
67 return $this;
68 }
69
70 }