相关疑难解决方法(0)

Typo3 Extbase Repository-> findAll()返回空

即使我能够通过findByUid()访问特定记录,我也无法找到所有()返回任何内容.

我已经注意到(并试图解决/设置)typoscript解决方案记录存储页面错误,但没有任何成功.

为了您的方便,我正在使用TYPO3(当前版本)中的扩展构建器生成的虚拟扩展代码.我已经通过TYPO3配置ui手动添加数据进行了测试.

任何帮助将非常感激.

一切顺利,并提前感谢

马里奥

extbase typo3-6.2.x

4
推荐指数
1
解决办法
7815
查看次数

在调度程序任务中使用removeAll()

在做新东西之前,我希望我的scheduler-Task从数据库中删除所有条目,execute-function看起来像这样:

public function execute() {

  $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
  $jobRepository = $objectManager->get('\TYPO3\MyExtension\Domain\Repository\JobRepository');

  //clear DB
  $jobRepository->removeAll();

  (...)//insert new entries to DB

  $objectManager->get('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface')->persistAll();

  return true;
}
Run Code Online (Sandbox Code Playgroud)

将新条目插入数据库工作正常,但清除数据库根本不起作用.我究竟做错了什么?

typo3 scheduler extbase

1
推荐指数
1
解决办法
1428
查看次数

标签 统计

extbase ×2

scheduler ×1

typo3 ×1

typo3-6.2.x ×1