-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathextension.driver.php
47 lines (41 loc) · 1.12 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
<?php
class Extension_Archivedfilter extends Extension {
/**
* Extension information
*/
public function about() {
return array(
'name' => 'Archived Filter',
'version' => '1.0',
'release-date' => '2011-06-15',
'author' => array(
'name' => 'Brock Petrie',
'website' => 'http://www.brockpetrie.com',
'email' => '[email protected]'
),
'description' => 'Adds a toggle button to show/hide archived items.'
);
}
/**
* Add callback functions to backend delegates
*/
public function getSubscribedDelegates() {
return array(
array(
'page' => '/backend/',
'delegate' => 'InitaliseAdminPageHead',
'callback' => 'initaliseAdminPageHead'
)
);
}
/**
* Add JavaScript
*/
public function initaliseAdminPageHead($context) {
$callback = Symphony::Engine()->getPageCallback();
// Append javascript for publish table
if($callback['driver'] == 'publish' && $callback['context']['page'] == 'index') {
Symphony::Engine()->Page->addScriptToHead(URL . '/extensions/archivedfilter/assets/archivedfilter.publish.js', 2000);
}
}
}