-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathext_localconf.php
More file actions
71 lines (64 loc) · 2.15 KB
/
Copy pathext_localconf.php
File metadata and controls
71 lines (64 loc) · 2.15 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY] = unserialize($_EXTCONF);
/**
* Configure the Plugin to call the
* right combination of Controller and Action according to
* the user input (default settings, FlexForm, URL etc.)
*/
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['registerSinglePlugin']) {
// fully fletged blog
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY, // The extension name (in UpperCamelCase) or the extension key (in lower_underscore)
'Pi1', // A unique name of the plugin in UpperCamelCase
array ( // An array holding the controller-action-combinations that are accessible
'Blog' => 'index,new,create,delete,deleteAll,edit,update,populate', // The first controller and its first action will be the default
'Post' => 'index,show,new,create,delete,edit,update',
'Comment' => 'create,delete'
),
array( // An array of non-cachable controller-action-combinations (they must already be enabled)
'Blog' => 'create,delete,deleteAll,update,populate',
'Post' => 'create,delete,update',
'Comment' => 'create,delete'
)
);
} else {
// Blog plugins
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'BlogList',
array('Blog' => 'index')
);
// Post plugins
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'PostList',
array('Post' => 'index')
);
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'PostSingle',
array('Post' => 'show', 'Comment' => 'create'),
array('Comment' => 'create')
);
// admin plugins
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'BlogAdmin',
array(
'Blog' => 'new,create,delete,deleteAll,edit,update,populate',
'Post' => 'new,create,delete,edit,update',
'Comment' => 'delete',
),
array(
'Blog' => 'create,delete,deleteAll,update,populate',
'Post' => 'create,delete,update',
'Comment' => 'delete',
)
);
}
if (TYPO3_MODE === 'BE') {
// register setup command
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Tx_BlogExample_Command_SetupCommandController';
}
?>