Compare commits

..

3 Commits

3 changed files with 27 additions and 1 deletions

View File

@ -12,8 +12,8 @@ namespace Cjel\TemplatesAide\Controller;
*
***/
use Cjel\TemplatesAide\Traits\ValidationTrait;
use Cjel\TemplatesAide\Traits\FormatResultTrait;
use Cjel\TemplatesAide\Traits\ValidationTrait;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Cache\CacheManager;
@ -23,6 +23,8 @@ use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
use TYPO3\CMS\Extbase\Reflection\ClassSchema;
use TYPO3\CMS\Extbase\Reflection\ReflectionService;
use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
@ -257,6 +259,17 @@ class AbstractEIDController
}
}
/**
*
*/
public function persistAll()
{
($this->objectManager->get(
PersistenceManager::class
))->persistAll();
}
/**
* return function
*

View File

@ -123,6 +123,7 @@ trait ValidationTrait
{
$validator = new Validator();
$input = ArrayUtility::removeEmptyStrings($input);
unset($input['eID']);
//@TODO make optional when usiing rest api
//array_walk_recursive(
// $input,

View File

@ -54,4 +54,16 @@ class DatabaseUtility
->createQueryBuilder();
return $queryBuilder;
}
/**
* Gets a connection for a table and returns it
*
* @param $tablename string table name
* @return object connection
*/
public static function getConnectionFromTableName($tableName)
{
return GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($tableName);
}
}