Permalink
Browse files

Fixing SS 3.1 deprecated issues, use YAML config for extensions

  • Loading branch information...
1 parent eefc8c9 commit a0844b89710298298aa62ea0ca9e3b3ecec574fb @halkyon halkyon committed Mar 28, 2013
Showing with 13 additions and 9 deletions.
  1. +3 −3 README.md
  2. +0 −6 _config.php
  3. +10 −0 _config/workflowconfig.yml
View
6 README.md
@@ -21,17 +21,17 @@ for more info!
Add
- Object::add_extension('SiteTree', 'WorkflowApplicable');
+ SiteTree::add_extension('WorkflowApplicable');
to your site's _config.php file
To apply workflow to files, add this to _config.php:
- Object::add_extension('File', 'FileWorkflowApplicable');
+ File::add_extension('FileWorkflowApplicable');
To enable embargo/expiry (scheduled publish/unpublish), use this:
- Object::add_extension('SiteTree', 'WorkflowEmbargoExpiryExtension');
+ SiteTree::add_extension('WorkflowEmbargoExpiryExtension');
Make sure the QueuedJobs module is installed and configured correctly -
you should have a cronjob similar to the following in place
View
6 _config.php
@@ -3,12 +3,6 @@
* @license BSD License (http://silverstripe.org/bsd-license/)
* @package advancedworkflow
*/
-
-// Add the following to your config to enable workflow
-DataObject::add_extension('SiteTree', 'WorkflowApplicable');
-
-Object::add_extension('CMSPageEditController', 'AdvancedWorkflowExtension');
-
define('ADVANCED_WORKFLOW_DIR', basename(dirname(__FILE__)));
if(ADVANCED_WORKFLOW_DIR != 'advancedworkflow') {
View
10 _config/workflowconfig.yml
@@ -0,0 +1,10 @@
+---
+Name: workflowconfig
+After: 'framework/*','cms/*'
+---
+SiteTree:
+ extensions:
+ - WorkflowApplicable
+CMSPageEditController:
+ extensions:
+ - AdvancedWorkflowExtension

0 comments on commit a0844b8

Please sign in to comment.