Revert "[CLEANUP] Rework/simplify copyright header and remove @package"
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / Widget / AutocompleteViewHelper.php
1 <?php
2 namespace TYPO3\CMS\Fluid\ViewHelpers\Widget;
3
4 /* *
5 * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6 * *
7 * It is free software; you can redistribute it and/or modify it under *
8 * the terms of the GNU Lesser General Public License, either version 3 *
9 * of the License, or (at your option) any later version. *
10 * *
11 * *
12 * This script is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
14 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser *
15 * General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with the script. *
19 * If not, see http://www.gnu.org/licenses/lgpl.html *
20 * *
21 * The TYPO3 project - inspiring people to share! *
22 * */
23 /**
24 * Simple paginate widget
25 * Note: Make sure to include jQuery and jQuery UI in the HTML, like that:
26 * <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
27 * <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script>
28 * <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jquery-ui.css" type="text/css" media="all" />
29 * <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />
30 * You can include the provided TS template that includes the above snippet to the pages headerData.
31 *
32 * = Examples =
33 *
34 * <code title="Render lib object">
35 * <input type="text" id="name" />
36 * <f:widget.autocomplete for="name" objects="{posts}" searchProperty="author">
37 * </code>
38 * <output>
39 * <input type="text" id="name" />
40 * the input field and the required JavaScript for the Ajax communication (see Resources/Private/Templates/ViewHelpers/Widget/Autocomplete/Index.html
41 * </output>
42 *
43 * @api
44 */
45 class AutocompleteViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper {
46
47 /**
48 * @var bool
49 */
50 protected $ajaxWidget = TRUE;
51
52 /**
53 * @var \TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\AutocompleteController
54 * @inject
55 */
56 protected $controller;
57
58 /**
59 * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $objects
60 * @param string $for
61 * @param string $searchProperty
62 * @return string
63 */
64 public function render(\TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $objects, $for, $searchProperty) {
65 return $this->initiateSubRequest();
66 }
67 }