added Resources dir for metadata, layouts. Upper camel case for entity filenames of metadata, layouts

This commit is contained in:
Taras Machyshyn
2013-11-18 16:40:41 +02:00
parent d1c2531125
commit e31b7a40a6
194 changed files with 25 additions and 21 deletions
+6 -6
View File
@@ -3,9 +3,9 @@ data/cache/*
application/config.php
/test.php
/test2.php
application/Espo/Metadata/scopes/CustomTest.json
application/Espo/Metadata/customTest/*
application/Espo/Layouts/customTest/*
application/Modules/Crm/Metadata/customTest/*
application/Modules/Crm/Layouts/customTest/*
application/Espo/Resources/metadata/scopes/CustomTest.json
application/Modules/Crm/Resources/metadata/scopes/CustomTest.json
application/Espo/Resources/layouts/CustomTest/*
application/Modules/Crm/Resources/layouts/CustomTest/*
application/Espo/Resources/metadata/customTest/*
application/Modules/Crm/Resources/metadata/customTest/*
+11 -7
View File
@@ -96,11 +96,15 @@ class Application
//convert all url params to camel case format
$this->getSlim()->hook('slim.before.dispatch', function () use ($slim, $container) {
$routeParams= $slim->router()->getCurrentRoute()->getParams();
$conditions = $slim->router()->getCurrentRoute()->getConditions();
$upperList = isset($conditions['upper']) ? $conditions['upper'] : array();
$routeParams= $slim->router()->getCurrentRoute()->getParams();
if (!empty($routeParams)) {
foreach($routeParams as &$param) {
$param= \Espo\Core\Utils\Util::toCamelCase($param);
foreach($routeParams as $name => &$param) {
$isUpper = in_array($name, $upperList) ? true : false;
$param= \Espo\Core\Utils\Util::toCamelCase($param, $isUpper);
}
$slim->router()->getCurrentRoute()->setParams($routeParams);
@@ -187,7 +191,7 @@ EOT;
'scope' => ':scope',
'action' => ':type',
);
});
})->conditions( array('upper' => array('scope')) );
//END: METADATA
//SETTINGS
@@ -211,7 +215,7 @@ EOT;
'scope' => ':controller',
'action' => ':name',
);
});
})->conditions( array('upper' => array('controller')) );
$this->getSlim()->put('/:controller/layout/:name/', function() {
return array(
@@ -219,7 +223,7 @@ EOT;
'scope' => ':controller',
'action' => ':name',
);
});
})->conditions( array('upper' => array('controller')) );
$this->getSlim()->map('/:controller/layout/:name/', function() {
return array(
@@ -227,7 +231,7 @@ EOT;
'scope' => ':controller',
'action' => ':name',
);
})->via('PATCH');
})->via('PATCH')->conditions( array('upper' => array('controller')) );
//END: LAYOUT
@@ -18,16 +18,16 @@ return array (
array (
'name' => 'metadata',
'cachePath' => 'data/cache/application',
'corePath' => 'application/Espo/Metadata',
'customPath' => 'application/Modules/{*}/Metadata',
'corePath' => 'application/Espo/Resources/metadata',
'customPath' => 'application/Modules/{*}/Resources/metadata',
'doctrineCache' => 'data/cache/doctrine/metadata',
),
'layoutConfig' =>
array (
'name' => 'layouts',
'corePath' => 'application/Espo/Layouts',
'customPath' => 'application/Modules/{*}/Layouts',
'corePath' => 'application/Espo/Resources/layouts',
'customPath' => 'application/Modules/{*}/Resources/layouts',
),
'languageConfig' =>

Some files were not shown because too many files have changed in this diff Show More