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
13d85612
Commit
13d85612
authored
Nov 17, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
e583a4d4
'
* commit '
e583a4d4
': Squashed 'Modules/Core/' changes from dac4ddb..fac6305
parents
3deeb236
e583a4d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
4 deletions
+44
-4
InstallCommand.php
Modules/Core/Console/InstallCommand.php
+2
-2
Translatable.php
Modules/Core/Internationalisation/Translatable.php
+39
-0
CoreServiceProvider.php
Modules/Core/Providers/CoreServiceProvider.php
+2
-2
readme.md
Modules/Core/readme.md
+1
-0
No files found.
Modules/Core/Console/InstallCommand.php
View file @
13d85612
...
...
@@ -13,14 +13,14 @@ class InstallCommand extends Command
*
* @var string
*/
protected
$name
=
'
platform
:install'
;
protected
$name
=
'
asgard
:install'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Install
the Platform
CMS'
;
protected
$description
=
'Install
Asgard
CMS'
;
/**
* @var UserRepository
...
...
Modules/Core/Internationalisation/Translatable.php
0 → 100644
View file @
13d85612
<?php
namespace
Modules\Core\Internationalisation
;
trait
Translatable
{
use
\Dimsav\Translatable\Translatable
;
public
function
save
(
array
$options
=
array
())
{
$tempTranslations
=
$this
->
translations
;
if
(
$this
->
exists
)
{
if
(
count
(
$this
->
getDirty
())
>
0
)
{
// If $this->exists and dirty, parent::save() has to return true. If not,
// an error has occurred. Therefore we shouldn't save the translations.
if
(
parent
::
save
(
$options
))
{
$this
->
translations
=
$tempTranslations
;
return
$this
->
saveTranslations
();
}
return
false
;
}
else
{
// If $this->exists and not dirty, parent::save() skips saving and returns
// false. So we have to save the translations
$this
->
translations
=
$tempTranslations
;
return
$this
->
saveTranslations
();
}
}
elseif
(
parent
::
save
(
$options
))
{
// We save the translations only if the instance is saved in the database.
$this
->
translations
=
$tempTranslations
;
return
$this
->
saveTranslations
();
}
return
false
;
}
}
Modules/Core/Providers/CoreServiceProvider.php
View file @
13d85612
...
...
@@ -102,7 +102,7 @@ class CoreServiceProvider extends ServiceProvider
*/
private
function
registerInstallCommand
()
{
$this
->
app
->
bindShared
(
'command.
platform
.install'
,
function
(
$app
)
{
$this
->
app
->
bindShared
(
'command.
asgard
.install'
,
function
(
$app
)
{
return
new
InstallCommand
(
$app
[
'Modules\User\Repositories\UserRepository'
],
$app
[
'files'
]
...
...
@@ -110,7 +110,7 @@ class CoreServiceProvider extends ServiceProvider
});
$this
->
commands
(
'command.
platform
.install'
'command.
asgard
.install'
);
}
}
Modules/Core/readme.md
View file @
13d85612
...
...
@@ -2,3 +2,4 @@
[
![SensioLabsInsight
](
https://insight.sensiolabs.com/projects/57e26b38-6275-4608-96e2-44047aaed5c2/mini.png
)
](https://insight.sensiolabs.com/projects/57e26b38-6275-4608-96e2-44047aaed5c2)
[
![Scrutinizer Code Quality
](
https://scrutinizer-ci.com/g/AsgardCms/Core/badges/quality-score.png?b=master
)
](https://scrutinizer-ci.com/g/AsgardCms/Core/?branch=master)
[
![Code Climate
](
https://codeclimate.com/github/AsgardCms/Core/badges/gpa.svg
)
](https://codeclimate.com/github/AsgardCms/Core)
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