|
TYPO3 API
SVNRelease
|
00001 <?php 00002 00003 /* * 00004 * This script belongs to the FLOW3 package "Fluid". * 00005 * * 00006 * It is free software; you can redistribute it and/or modify it under * 00007 * the terms of the GNU Lesser General Public License as published by the * 00008 * Free Software Foundation, either version 3 of the License, or (at your * 00009 * option) any later version. * 00010 * * 00011 * This script is distributed in the hope that it will be useful, but * 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- * 00013 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser * 00014 * General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Lesser General Public * 00017 * License along with the script. * 00018 * If not, see http://www.gnu.org/licenses/lgpl.html * 00019 * * 00020 * The TYPO3 project - inspiring people to share! * 00021 * */ 00022 00023 /** 00024 * Simple paginate widget 00025 * Note: Make sure to include jQuery and jQuery UI in the HTML, like that: 00026 * <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 00027 * <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script> 00028 * <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jquery-ui.css" type="text/css" media="all" /> 00029 * <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> 00030 * You can include the provided TS template that includes the above snippet to the pages headerData. 00031 * 00032 * = Examples = 00033 * 00034 * <code title="Render lib object"> 00035 * <input type="text" id="name" /> 00036 * <f:widget.autocomplete for="name" objects="{posts}" searchProperty="author"> 00037 * </code> 00038 * <output> 00039 * <input type="text" id="name" /> 00040 * // the input field and the required JavaScript for the Ajax communication (see Resources/Private/Templates/ViewHelpers/Widget/Autocomplete/Index.html 00041 * </output> 00042 * 00043 00044 * 00045 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later 00046 * @api 00047 */ 00048 class Tx_Fluid_ViewHelpers_Widget_AutocompleteViewHelper extends Tx_Fluid_Core_Widget_AbstractWidgetViewHelper { 00049 00050 /** 00051 * @var bool 00052 */ 00053 protected $ajaxWidget = TRUE; 00054 00055 /** 00056 * @var Tx_Fluid_ViewHelpers_Widget_Controller_AutocompleteController 00057 */ 00058 protected $controller; 00059 00060 /** 00061 * @param Tx_Fluid_ViewHelpers_Widget_Controller_AutocompleteController $controller 00062 * @return void 00063 */ 00064 public function injectController(Tx_Fluid_ViewHelpers_Widget_Controller_AutocompleteController $controller) { 00065 $this->controller = $controller; 00066 } 00067 00068 /** 00069 * 00070 * @param Tx_Extbase_Persistence_QueryResult $objects 00071 * @param string $for 00072 * @param string $searchProperty 00073 * @return string 00074 */ 00075 public function render(Tx_Extbase_Persistence_QueryResult $objects, $for, $searchProperty) { 00076 return $this->initiateSubRequest(); 00077 } 00078 } 00079 ?>
1.8.0