Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
30a6701a
Commit
30a6701a
authored
Nov 27, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
fix merge conflict
parents
4b3bc4c8
43a56a34
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
48 deletions
+95
-48
Composer.php
Modules/Core/Composer.php
+78
-0
config.php
Modules/Core/Config/config.php
+1
-1
InstallCommand.php
Modules/Core/Console/InstallCommand.php
+14
-1
RoutingServiceProvider.php
Modules/Core/Providers/RoutingServiceProvider.php
+0
-40
top-nav.blade.php
Modules/Core/Resources/views/partials/top-nav.blade.php
+2
-6
No files found.
Modules/Core/Composer.php
0 → 100644
View file @
30a6701a
<?php
namespace
Modules\Core\Services
;
use
Symfony\Component\Process\Process
;
class
Composer
extends
\Illuminate\Foundation\Composer
{
protected
$outputHandler
=
null
;
private
$output
;
/**
* Enable real time output of all commands.
*
* @param $command
* @return void
*/
public
function
enableOutput
(
$command
)
{
$this
->
output
=
function
(
$type
,
$buffer
)
use
(
$command
)
{
if
(
Process
::
ERR
===
$type
)
{
$command
->
info
(
trim
(
'[ERR] > '
.
$buffer
));
}
else
{
$command
->
info
(
trim
(
'> '
.
$buffer
));
}
};
}
/**
* Disable real time output of all commands.
*
* @return void
*/
public
function
disableOutput
()
{
$this
->
output
=
null
;
}
/**
* Update all composer packages.
*
* @param string $package
* @return void
*/
public
function
update
(
$package
=
null
)
{
if
(
!
is_null
(
$package
))
{
$package
=
'"'
.
$package
.
'"'
;
}
$process
=
$this
->
getProcess
();
$process
->
setCommandLine
(
trim
(
$this
->
findComposer
()
.
' update '
.
$package
));
$process
->
run
(
$this
->
output
);
}
/**
* Require a new composer package.
*
* @param string $package
* @return void
*/
public
function
install
(
$package
)
{
if
(
!
is_null
(
$package
))
{
$package
=
'"'
.
$package
.
'"'
;
}
$process
=
$this
->
getProcess
();
$process
->
setCommandLine
(
trim
(
$this
->
findComposer
()
.
' require '
.
$package
));
$process
->
run
(
$this
->
output
);
}
public
function
remove
(
$package
)
{
if
(
!
is_null
(
$package
))
{
$package
=
'"'
.
$package
.
'"'
;
}
$process
=
$this
->
getProcess
();
$process
->
setCommandLine
(
trim
(
$this
->
findComposer
()
.
' remove '
.
$package
));
$process
->
run
(
$this
->
output
);
}
}
Modules/Core/Config/config.php
View file @
30a6701a
...
...
@@ -19,7 +19,7 @@ return [
|--------------------------------------------------------------------------
*/
'front-themes'
=>
[
'
bootstrap
'
,
'
demo
'
,
'default'
]
];
Modules/Core/Console/InstallCommand.php
View file @
30a6701a
...
...
@@ -186,6 +186,19 @@ class InstallCommand extends Command
$this
->
call
(
'publish:config'
,
[
'package'
=>
'dimsav/laravel-translatable'
]);
$this
->
call
(
'publish:config'
,
[
'package'
=>
'mcamara/laravel-localization'
]);
$this
->
call
(
'publish:config'
,
[
'package'
=>
'pingpong/modules'
]);
$this
->
call
(
'publish:config'
,
[
'package'
=>
'mpedrera/themify'
]);
$this
->
adaptThemifyConfiguration
();
}
/**
* Configure the mpedrera/themify configuration
* @throws \Illuminate\Filesystem\FileNotFoundException
*/
private
function
adaptThemifyConfiguration
()
{
$themifyConfig
=
$this
->
finder
->
get
(
'config/packages/mpedrera/themify/config.php'
);
$themifyConfig
=
str_replace
(
'app_path()'
,
'base_path()'
,
$themifyConfig
);
$this
->
finder
->
put
(
'config/packages/mpedrera/themify/config.php'
,
$themifyConfig
);
}
/**
...
...
@@ -318,7 +331,7 @@ class InstallCommand extends Command
$path
=
"config/packages/cartalyst/
{
$driver
}
/config.php"
;
$config
=
$this
->
finder
->
get
(
$path
);
$config
=
str_replace
(
$search
,
"Modules
\\
User
\\
Entities
\\
{
$Driver
}
\\
User"
,
$config
);
$config
=
str_replace
(
$search
,
"Modules
\\
User
\\
Entities
\\
{
$Driver
}
User"
,
$config
);
$this
->
finder
->
put
(
$path
,
$config
);
}
...
...
Modules/Core/Providers/RoutingServiceProvider.php
View file @
30a6701a
...
...
@@ -2,51 +2,11 @@
use
Illuminate\Foundation\Support\Providers\RouteServiceProvider
as
ServiceProvider
;
use
Illuminate\Routing\Router
;
use
Mcamara\LaravelLocalization\Facades\LaravelLocalization
;
class
RoutingServiceProvider
extends
ServiceProvider
{
public
function
before
(
Router
$router
)
{
// $modules = app('modules');
// $routes = app('Asgard.routes');
// foreach ($modules->enabled() as $module) {
// $router->group(
// ['namespace' => "Modules\\$module\\Http\\Controllers"],
// function (Router $router) use ($module, $routes) {
// foreach (LaravelLocalization::getSupportedLocales() as $locale => $language) {
// if ($this->moduleHasRoute($routes, $module, $locale)) {
// $uri = $routes[strtolower($module)][$locale];
// $router->get(
// $uri,
// [
// 'as' => "{$locale}.{$module}",
// 'uses' => 'PublicController@index'
// ]
// );
// $router->get(
// $uri . '/{slug}',
// [
// 'as' => "{$locale}.{$module}.slug",
// 'uses' => 'PublicController@show'
// ]
// );
// }
// }
// }
// );
// }
}
/**
* @param $routes
* @param $module
* @param $locale
* @return bool
*/
private
function
moduleHasRoute
(
$routes
,
$module
,
$locale
)
{
return
isset
(
$routes
[
strtolower
(
$module
)][
$locale
]);
}
public
function
map
(
Router
$router
)
...
...
Modules/Core/Resources/views/partials/top-nav.blade.php
View file @
30a6701a
...
...
@@ -10,6 +10,7 @@
<div
class=
"navbar-right"
>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"{{ URL::to('/') }}"
target=
"_blank"
><i
class=
"fa fa-eye"
></i>
View Website
</a></li>
<li
class=
"dropdown"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-flag"
></i>
...
...
@@ -55,12 +56,7 @@
</li>
<!-- Menu Footer-->
<li
class=
"user-footer"
>
<div
class=
"pull-left"
>
<a
href=
"{{ URL::route('dashboard.user.edit', [$user->id]) }}"
class=
"btn btn-default btn-flat"
>
Profile
</a>
</div>
<div
class=
"pull-right"
>
<a
href=
"{{ URL::route('logout') }}"
class=
"btn btn-default btn-flat"
>
Sign out
</a>
</div>
<a
href=
"{{ URL::route('logout') }}"
class=
"btn btn-default btn-flat"
>
Sign out
</a>
</li>
</ul>
</li>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment