forked from twiro/slider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.driver.php
49 lines (45 loc) · 1.04 KB
/
extension.driver.php
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
<?php
Class extension_Slider extends Extension
{
// About this extension:
public function about()
{
return array(
'name' => 'Field: Slider',
'version' => '0.2',
'release-date' => '2011-12-16',
'author' => array(
'name' => 'Twisted Interactive',
'website' => 'http://www.twisted.nl'),
'description' => 'Defines a slider with a range'
);
}
// Set the delegates:
public function getSubscribedDelegates()
{
// No delegates
return array();
}
// Installation:
public function install()
{
Symphony::Database()->query("CREATE TABLE IF NOT EXISTS `tbl_fields_slider` (
`id` int(11) unsigned NOT NULL auto_increment,
`field_id` int(11) unsigned NOT NULL,
`min_range` INT NOT NULL,
`max_range` INT NOT NULL,
`start_value` INT NOT NULL,
`increment_value` VARCHAR(255) NOT NULL,
`range` BOOL NOT NULL,
PRIMARY KEY (`id`),
KEY `field_id` (`field_id`)
)");
return true;
}
public function uninstall()
{
Symphony::Database()->query("DROP TABLE `tbl_fields_slider`;");
return true;
}
}
?>