[FEATURE] Add persistenceManagerTrait
This commit is contained in:
parent
0c534753d8
commit
46f7b519b7
37
Classes/Traits/PersistenceManagerTrait.php
Normal file
37
Classes/Traits/PersistenceManagerTrait.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
namespace Cjel\TemplatesAide\Traits;
|
||||||
|
|
||||||
|
/***
|
||||||
|
*
|
||||||
|
* This file is part of the "Templates Aide" Extension for TYPO3 CMS.
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please read the
|
||||||
|
* LICENSE.txt file that was distributed with this source code.
|
||||||
|
*
|
||||||
|
* (c) 2021 Philipp Dieter <philippdieter@attic-media.net>
|
||||||
|
*
|
||||||
|
***/
|
||||||
|
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||||
|
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
|
||||||
|
use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ValidationTrait
|
||||||
|
*/
|
||||||
|
trait PersistenceManagerTrait
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function persistAll()
|
||||||
|
{
|
||||||
|
(GeneralUtility::makeInstance(
|
||||||
|
ObjectManager::class
|
||||||
|
)->get(
|
||||||
|
PersistenceManager::class
|
||||||
|
))->persistAll();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user