Skip to content

Commit

Permalink
Changed namespace to AdditionalMetafields
Browse files Browse the repository at this point in the history
  • Loading branch information
kozi committed Aug 18, 2014
1 parent 119e30f commit 993e41f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@
}
}
}


4 changes: 2 additions & 2 deletions contao/classes/MetaFieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* Run in a custom namespace, so the class can be replaced
*/
namespace Contao;
namespace AdditionalMetafields;

/**
* Class MetaFieldsHelper
Expand All @@ -27,7 +27,7 @@
* @author Martin Kozianka <http://kozianka.de/>
* @package additional_metafields
*/
class MetaFieldsHelper extends Frontend {
class MetaFieldsHelper extends \Frontend {

public static function getFileExtensions() {
$exts = array();
Expand Down
7 changes: 5 additions & 2 deletions contao/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
*/



ClassLoader::addNamespace('AdditionalMetafields');

ClassLoader::addClasses(array(
'Contao\MetaFieldsHelper' => 'system/modules/additional_metafields/classes/MetaFieldsHelper.php',
'Contao\MetaWizardPlus' => 'system/modules/additional_metafields/widgets/MetaWizardPlus.php'
'AdditionalMetafields\MetaFieldsHelper' => 'system/modules/additional_metafields/classes/MetaFieldsHelper.php',
'AdditionalMetafields\MetaWizardPlus' => 'system/modules/additional_metafields/widgets/MetaWizardPlus.php'
));
4 changes: 2 additions & 2 deletions contao/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* @filesource
*/

$GLOBALS['TL_HOOKS']['getContentElement'][] = array('MetaFieldsHelper', 'injectMetaData');
$GLOBALS['BE_FFL']['metaWizardPlus'] = 'MetaWizardPlus';
$GLOBALS['TL_HOOKS']['getContentElement'][] = array('AdditionalMetafields\MetaFieldsHelper', 'injectMetaData');
$GLOBALS['BE_FFL']['metaWizardPlus'] = 'AdditionalMetafields\MetaWizardPlus';

if (TL_MODE == 'BE') {
$GLOBALS['TL_CSS'][] = "/system/modules/additional_metafields/assets/style.css|screen";
Expand Down
4 changes: 2 additions & 2 deletions contao/widgets/MetaWizardPlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* Run in a custom namespace, so the class can be replaced
*/
namespace Contao;
namespace AdditionalMetafields;


/**
Expand Down Expand Up @@ -49,7 +49,7 @@ public function generate() {
// Make sure there is at least an empty array
if (!is_array($this->varValue) || empty($this->varValue))
{
$this->import('BackendUser', 'User');
$this->import('Contao\BackendUser', 'User');
$this->varValue = array($this->User->language=>array()); // see #4188
}

Expand Down

0 comments on commit 993e41f

Please sign in to comment.