Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
t3o
my.typo3.org
Commits
99f968db
Commit
99f968db
authored
Nov 05, 2018
by
mabolek
Committed by
Thomas Löffler
Feb 11, 2019
Browse files
[TASK] It is possible to add karma to a user and cache it
parent
e2d0fd7f
Changes
4
Hide whitespace changes
Inline
Side-by-side
extensions/karma/Classes/Controller/ManagerController.php
View file @
99f968db
...
...
@@ -2,6 +2,10 @@
namespace
T3o\Karma\Controller
;
<<<<<<<
HEAD
:
extensions
/
karma
/
Classes
/
Controller
/
ManagerController
.
php
=======
use
T3o\Karma\Domain\Model\KarmaSource
;
>>>>>>>
[
TASK
]
It
is
possible
to
add
karma
to
a
user
and
cache
it
:
html
/
typo3conf
/
ext
/
karma
/
Classes
/
Controller
/
ManagerController
.
php
use
T3o\Karma\Domain\Repository\KarmaSourceRepository
;
use
T3o\Karma\Service\KarmaService
;
use
TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository
;
...
...
@@ -65,8 +69,12 @@ class ManagerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll
/**
* @param KarmaSourceRepository $karmaSourceRepository
*/
<<<<<<<
HEAD
:
extensions
/
karma
/
Classes
/
Controller
/
ManagerController
.
php
public
function
injectKarmaSourceRepository
(
KarmaSourceRepository
$karmaSourceRepository
)
{
=======
public
function
injectKarmaSourceRepository
(
KarmaSourceRepository
$karmaSourceRepository
)
{
>>>>>>>
[
TASK
]
It
is
possible
to
add
karma
to
a
user
and
cache
it
:
html
/
typo3conf
/
ext
/
karma
/
Classes
/
Controller
/
ManagerController
.
php
$this
->
karmaSourceRepository
=
$karmaSourceRepository
;
}
...
...
@@ -81,7 +89,13 @@ class ManagerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll
$this
->
karmaService
->
addKarmaToUser
(
12
,
$frontendUser
,
$karmaSource
);
<<<<<<<
HEAD
:
extensions
/
karma
/
Classes
/
Controller
/
ManagerController
.
php
$valueReturned
=
$this
->
karmaService
->
getImmutableKarmaForUser
(
$frontendUser
,
true
,
true
);
=======
$valueReturned
=
$this
->
karmaService
->
getImmutableKarmaForUser
(
$frontendUser
);
>>>>>>>
[
TASK
]
It
is
possible
to
add
karma
to
a
user
and
cache
it
:
html
/
typo3conf
/
ext
/
karma
/
Classes
/
Controller
/
ManagerController
.
php
var_dump
(
$valueReturned
);
}
...
...
extensions/karma/Classes/Domain/Model/LedgerEntry.php
View file @
99f968db
...
...
@@ -2,6 +2,11 @@
namespace
T3o\Karma\Domain\Model
;
<<<<<<<
HEAD
:
extensions
/
karma
/
Classes
/
Domain
/
Model
/
LedgerEntry
.
php
=======
use
T3o\Karma\Domain\Model\FrontendUser
;
>>>>>>>
[
TASK
]
It
is
possible
to
add
karma
to
a
user
and
cache
it
:
html
/
typo3conf
/
ext
/
karma
/
Classes
/
Domain
/
Model
/
LedgerEntry
.
php
/***************************************************************
* Copyright notice
*
...
...
extensions/karma/Classes/Service/KarmaService.php
View file @
99f968db
...
...
@@ -83,7 +83,11 @@ class KarmaService implements \TYPO3\CMS\Core\SingletonInterface
$mutableKarma
=
$this
->
getMutableKarmaForUser
(
$frontendUser
,
true
,
false
);
$frontendUser
->
setKarmaImmutableValueCache
(
$immutableKarma
);
<<<<<<<
HEAD
:
extensions
/
karma
/
Classes
/
Service
/
KarmaService
.
php
$frontendUser
->
setKarmaMutableValueCache
(
$mutableKarma
);
=======
$frontendUser
->
setKarmaImmutableValueCache
(
$immutableKarma
);
>>>>>>>
[
TASK
]
It
is
possible
to
add
karma
to
a
user
and
cache
it
:
html
/
typo3conf
/
ext
/
karma
/
Classes
/
Service
/
KarmaService
.
php
$frontendUser
->
setKarmaCacheTimestamp
(
time
());
$this
->
frontendUserRepository
->
update
(
$frontendUser
);
...
...
@@ -114,7 +118,11 @@ class KarmaService implements \TYPO3\CMS\Core\SingletonInterface
$immutableKarma
=
$this
->
getImmutableKarmaForUser
(
$frontendUser
,
true
,
false
);
$frontendUser
->
setKarmaMutableValueCache
(
$mutableKarma
);
<<<<<<<
HEAD
:
extensions
/
karma
/
Classes
/
Service
/
KarmaService
.
php
$frontendUser
->
setKarmaImmutableValueCache
(
$immutableKarma
);
=======
$frontendUser
->
setKarmaMutableValueCache
(
$mutableKarma
);
>>>>>>>
[
TASK
]
It
is
possible
to
add
karma
to
a
user
and
cache
it
:
html
/
typo3conf
/
ext
/
karma
/
Classes
/
Service
/
KarmaService
.
php
$frontendUser
->
setKarmaCacheTimestamp
(
time
());
$this
->
frontendUserRepository
->
update
(
$frontendUser
);
...
...
extensions/karma/Resources/Private/Language/locallang_db.xlf
View file @
99f968db
...
...
@@ -27,6 +27,7 @@
<trans-unit
id=
"tx_karma_domain_model_ledgerentry.mutable_value"
>
<source>
Mutable Value
</source>
</trans-unit>
<<<<<<
< HEAD:extensions
/karma/Resources/Private/Language/locallang_db.xlf
<<<<<<<
HEAD:extensions/karma/Resources/Private/Language/locallang_db.xlf
<trans-unit
id=
"tx_karma_domain_model_ledgerentry.karma_source"
>
<source>
Karma Source
</source>
...
...
@@ -34,6 +35,10 @@
<trans-unit
id=
"tx_karma_domain_model_ledgerentry.type"
>
<source>
Type
</source>
>>>>>>> [FIX] Changed table name from *_ledger_entry to *_ledgerentry:html/typo3conf/ext/karma/Resources/Private/Language/locallang_db.xlf
=======
<trans-unit
id=
"tx_karma_domain_model_ledgerentry.karma_source"
>
<source>
Karma Source
</source>
>>>>>>> [TASK] It is possible to add karma to a user and cache it:html/typo3conf/ext/karma/Resources/Private/Language/locallang_db.xlf
</trans-unit>
<trans-unit
id=
"tx_karma_domain_model_ledgerentry.campaign"
>
<source>
Campaign
</source>
...
...
Write
Preview
Supports
Markdown
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