Skip to content

Commit

Permalink
Merge branch 'feature/upgrade-to-ss3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bates, Jeremy committed Oct 8, 2015
2 parents e41b8bb + 0f6e20c commit 35a1ed6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 45 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Installation (with composer)

$ composer require heyday/silverstripe-abtesting:~0.1

For 2.4 see the tag 0.1.7

## Usage

Expand Down
24 changes: 7 additions & 17 deletions code/ABTestingConfigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,20 @@
/**
* Class ABTestingConfigExtension
*/
class ABTestingConfigExtension extends Extension
class ABTestingConfigExtension extends DataExtension
{

/**
* Required for DataObject extensions
*
* @return array
*/
public function extraStatics()
{
return array(
'db' => array(
'ABGlobalTest' => 'Boolean',
'ABTestGlobalScript' => 'Text'
)
);
}
public static $db = array(
'ABGlobalTest' => 'Boolean',
'ABTestGlobalScript' => 'Text'
);

/**
* Update the CMS fields on the extended object
*
* @param FieldSet $fields
* @param FieldList $fields
*/
public function updateCMSFields(FieldSet &$fields)
public function updateCMSFields(FieldList $fields)
{

$member = Member::currentUser();
Expand Down
12 changes: 1 addition & 11 deletions code/ABTestingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,9 @@
/**
* Class ABTestingExtension
*/
class ABTestingExtension extends Extension
class ABTestingExtension extends DataExtension
{

/**
* Required for DataObject extensions
*
* @return array
*/
public function extraStatics()
{
return array();
}

/**
* @var array
*/
Expand Down
24 changes: 7 additions & 17 deletions code/ABTestingPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,20 @@
/**
* Class ABTestingPageExtension
*/
class ABTestingPageExtension extends Extension
class ABTestingPageExtension extends DataExtension
{

/**
* Required for DataObject extensions
*
* @return array
*/
public function extraStatics()
{
return array(
'db' => array(
'ABTestPage' => 'Boolean',
'ABTestInlineScript' => 'Text'
)
);
}
public static $db = array(
'ABTestPage' => 'Boolean',
'ABTestInlineScript' => 'Text'
);

/**
* Update the CMS fields on the extended object
*
* @param FieldSet $fields
* @param FieldList $fields
*/
public function updateCMSFields(FieldSet &$fields)
public function updateCMSFields(FieldList $fields)
{

$member = Member::currentUser();
Expand Down

0 comments on commit 35a1ed6

Please sign in to comment.