Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Moving configuration across to YAML.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Nov 7, 2014
1 parent 914cceb commit 98a5546
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if(!defined('MEDIAWESOME_PATH')) {
define('MEDIAWESOME_PATH', rtrim(basename(dirname(__FILE__))));
}
MediaType::apply_required_extensions();
MediaType::apply_requirements();

/**
*
Expand Down
9 changes: 9 additions & 0 deletions _config/extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: mediawesome-extensions
---
SiteConfig:
extensions:
- 'SiteConfigMediaPermissionExtension'
Page:
extensions:
- 'PageChildrenExtension'
5 changes: 1 addition & 4 deletions code/dataobjects/MediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ class MediaType extends DataObject {
* Apply all Mediawesome required extensions.
*/

public static function apply_required_extensions() {

Object::add_extension('SiteConfig', 'SiteConfigMediaPermissionExtension');
Object::add_extension('Page', 'PageChildrenExtension');
public static function apply_requirements() {

// Update the current media holder/page images.

Expand Down

0 comments on commit 98a5546

Please sign in to comment.