Project

General

Profile

Actions

Bug #76500

closed

Schedule dos not show checkbox if "bool" typehint used in Command Controller

Added by most wanted over 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
scheduler
Target version:
Start date:
2016-06-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

It seems to be encouraged by the TYPO3 CMS core team to use "bool" and not "boolean" in PHPDoc block type hints. The TYPO3 CMS core team itself uses the "PHPCodesniffer Fixer" to automatically replace those "boolean" with "bool" in PHPDoc blocks on a regular base. This tool uses "Build/.php_cs" as a configuration file and the option "phpdoc_scalar" makes sure that every "boolean" used in a PHPDoc block type hints is replaced by a "bool".

EXT:scheduler can execute "Extbase CommandController Tasks". You can pass arguments to that tasks. The user interface can be influenced by using @param annotations/typehints in the PHPDoc block of the task's method to be executed.

<?php
namespace Lorem\Ipsum\Command;

use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;

class FoobarCommandController extends CommandController
{
    /**
     * @param boolean $foo
     * @param bool $bar
     * @return void
     */
    public function updateCommand($foo = false, $bar = false)
    {
        // Do something!
    }
}

Up to now if you wanted to use a checkbox you had to use "boolean" in that typehint.


Files

bool001.png (37.7 KB) bool001.png most wanted, 2016-06-07 17:08
Actions

Also available in: Atom PDF