-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.driver.php
52 lines (42 loc) · 1.27 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
50
51
52
<?php
Final Class extension_pages_editor_minimal extends Extension{
public function fetchNavigation(){
return array(
/*array(
'location' => 'Blueprints',
'name' => 'New',
'link' => '/new/',
//'visible' => 'no'
),*/
array(
'location' => 'Blueprints',
'name' => 'Edit',
'link' => '/edit/',
'visible' => 'no'
),
);
}
public function about(){
return array('name' => 'Pages Editor - Minimal',
'version' => '1.0',
'release-date' => '2009-04-30',
'author' => array('name' => 'Alistair Kearney',
'website' => 'http://www.symphony21.com',
'email' => 'alistair@symphony21.com')
);
}
public function getSubscribedDelegates(){
return array(
array(
'page' => '/backend/',
'delegate' => 'InitaliseAdminPageHead',
'callback' => '__hijack'
),
);
}
public function __hijack(array $context=NULL){
if(preg_match('/\/symphony\/blueprints\/pages\/edit\/(\d+)\//i', Administration::instance()->getCurrentPageURL(), $match)){
redirect(URL . '/symphony/extension/pages_editor_minimal/edit/' . $match[1] . '/');
}
}
}