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
51 lines (39 loc) · 1.49 KB
/
controller.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
namespace Concrete\Package\MsvTable;
use Package;
use BlockType;
use AssetList;
use Asset;
class Controller extends Package {
protected $pkgHandle = 'msv_table';
protected $appVersionRequired = '5.7.3';
protected $pkgVersion = '0.9.5';
public function getPackageDescription() {
return t("A block to quickly enter and display tabular data.");
}
public function getPackageName() {
return t("Table Block");
}
public function install() {
$pkg = parent::install();
$this->configurePackage($pkg);
}
public function configurePackage($pkg) {
$blk = BlockType::getByHandle('msv_table');
if(!is_object($blk) ) {
BlockType::installBlockTypeFromPackage('msv_table', $pkg);
}
}
public function on_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'),
)
);
}
}