forked from Mesuva/msv_table
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.php
More file actions
Latest commit
51 lines (39 loc) · 1.49 KB
/
Copy pathcontroller.php
File metadata and controls
51 lines (39 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
// Author: Ryan Hewitt - http://www.mesuva.com.au
namespaceConcrete\Package\MsvTable;
usePackage;
useBlockType;
useAssetList;
useAsset;
class Controller extends Package {
protected$pkgHandle = 'msv_table';
protected$appVersionRequired = '5.7.3';
protected$pkgVersion = '0.9.5';
publicfunctiongetPackageDescription() {
returnt("A block to quickly enter and display tabular data.");
}
publicfunctiongetPackageName() {
returnt("Table Block");
}
publicfunctioninstall() {
$pkg = parent::install();
$this->configurePackage($pkg);
}
publicfunctionconfigurePackage($pkg) {
$blk = BlockType::getByHandle('msv_table');
if(!is_object($blk) ) {
BlockType::installBlockTypeFromPackage('msv_table', $pkg);
}
}
publicfunctionon_start() {
$al = AssetList::getInstance();
$al->register( 'javascript', 'handsontable', 'js/handsontable.full.min.js', array('version' => '15.0-beta6', 'position' => Asset::ASSET_POSITION_FOOTER, 'minify' => false, 'combine' => false), $this );
$al->register( 'css', 'handsontable', 'css/handsontable.full.min.css', array('version' => '15.0-beta6', 'position' => Asset::ASSET_POSITION_HEADER, 'minify' => false, 'combine' => false), $this );
$al->registerGroup('handsontable',
array(
array('javascript', 'handsontable'),
array('css', 'handsontable'),
)
);
}
}