Skip to content
Snippets Groups Projects
Commit a2bef2a1 authored by Claus Due's avatar Claus Due Committed by Benni Mack
Browse files

[FOLLOWUP][TASK] Deprecate render method arguments on ViewHelpers

Followup patch to migrate f:widget.autocomplete which
had been missed by the previous patch.

Change-Id: I9e2552925df84f225144b1120a93bf65d9874047
Resolves: #81213
Releases: master
Reviewed-on: https://review.typo3.org/53199


Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSimon Schaufelberger <simonschaufi+typo3@gmail.com>
Tested-by: default avatarSimon Schaufelberger <simonschaufi+typo3@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 5fa6c73c
Branches
Tags
No related merge requests found
......@@ -13,6 +13,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Widget;
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
/**
* Simple paginate widget
......@@ -48,6 +49,17 @@ class AutocompleteViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidget
*/
protected $controller;
/**
* Initialize arguments
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('objects', QueryResultInterface::class, 'Objects to auto-complete', true);
$this->registerArgument('for', 'string', 'Property to fill', true);
$this->registerArgument('searchProperty', 'string', 'Property to search within when filtering list', true);
}
/**
* @param \TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\AutocompleteController $controller
*/
......@@ -57,12 +69,9 @@ class AutocompleteViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidget
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $objects
* @param string $for
* @param string $searchProperty
* @return string
*/
public function render(\TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $objects, $for, $searchProperty)
public function render()
{
return $this->initiateSubRequest();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment