class CopyFactorySiteConfigExtension extends DataExtension
5
{
6
private static $db = array(
7
'AllowCopyingOfRecords' => 'Int'
8
);
9
10
11
public function updateCMSFields(FieldList $fields)
12
{
13
$fields->addFieldToTab(
14
'Root.Copy',
15
$myDD = new DropdownField(
16
"AllowCopyingOfRecords",
17
_t("CopyFactory.ALLOW_COPYING_OF_RECORDS", "Allow Copying of Records"),
18
array(
19
0 => _t("CopyFactory.NO_COPYING_AT_ALL", "Do not allow copying of records (default setting)"),
20
1 => _t("CopyFactory.DRY_RUN_ONLY", "Dry run only (not actual changes will be made)"),
21
2 => _t("CopyFactory.ALLOW_COPYING", "Allow copying of records (please use with care)")
22
)
23
)
24
);
25
$myDD->setRightTitle(_t("CopyFactory.TURN_IT_OFF", "It is recommended to turn on the ability to copy records only when required and to turn it off between copy sessions."));