[英]Typo3 - Extbase CommandController for scheduler task
i ve created an empty extbase/fluid extension and added an ImportCommandController for a scheduler task. 我创建了一个空的extbase / fluid扩展,并为调度程序任务添加了ImportCommandController。 For some reason i am not able to load that task in my scheduler.
由于某种原因,我无法在我的调度程序中加载该任务。 Please note that i want to realise my task via CommandController ( http://wiki.typo3.org/CommandController_In_Scheduler_Task ) and NOT via \\TYPO3\\CMS\\Scheduler\\Task\\AbstractTask.
请注意,我想通过CommandController( http://wiki.typo3.org/CommandController_In_Scheduler_Task )而不是通过\\ TYPO3 \\ CMS \\ Scheduler \\ Task \\ AbstractTask实现任务。
ext_localconf.php ext_localconf.php
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'VENDORx\\Sched\\Command\\ImportCommandController';
Classes/Command/ImportCommandController.php 类/命令/ImportCommandController.php
<?php
namespace VENDORx\Sched\Command;
/**
*
*
* @package Sched
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class ImportCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandController {
public function importCommand($commandIdentifier= NULL) {
echo 'command run';
}
}
?>
any idea whats missing?? 知道什么丢失了吗?
As Jost already mentioned you neet proper Annotations: 正如Jost已经提到的那样,您没有适当的注释:
/**
* @param integer $commandIdentifier
*/
public function importCommand($commandIdentifier = NULL) {
$this->outputLine('command run');
}
在下拉列表中选择“ Extbase-CommandController-Task”您将在底部获得另一个选择字段,您可以在其中找到“ ImportCommand”选择并保存
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.