Commit 99f968db authored by mabolek's avatar mabolek Committed by Thomas Löffler
Browse files

[TASK] It is possible to add karma to a user and cache it

parent e2d0fd7f
......@@ -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);
}
......
......@@ -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
*
......
......@@ -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);
......
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment