Compare commits
3 Commits
24f25388ce
...
53ac1436db
Author | SHA1 | Date | |
---|---|---|---|
53ac1436db | |||
444a0e0158 | |||
15e949e0e5 |
@ -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
|
||||
*
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user