Bug #21098 ยป 0012007_v1.diff
t3lib/tceforms/class.t3lib_tceforms_suggest.php | ||
---|---|---|
/**
|
||
* Renders an ajax-enabled text field. Also adds required JS
|
||
*
|
||
* @param string $fieldname The fieldname in the form
|
||
* @param string $table The table we render this selector for
|
||
* @param string $field The field we render this selector for
|
||
* @param array $row The row which is currently edited
|
||
* @param array $config The TSconfig of the field
|
||
* @return string The HTML code for the selector
|
||
* @param string $fieldname The fieldname in the form
|
||
* @param string $table The table we render this selector for
|
||
* @param string $field The field we render this selector for
|
||
* @param array $row The row which is currently edited
|
||
* @param array $config The TSconfig of the field
|
||
* @return string The HTML code for the selector
|
||
*/
|
||
public function renderSuggestSelector($fieldname, $table, $field, array $row, array $config) {
|
||
$this->suggestCount++;
|
||
... | ... | |
}
|
||
/**
|
||
* Ajax handler for the "suggest" feature in TCEforms
|
||
* compiles together the different results from
|
||
* Ajax handler for the "suggest" feature in TCEforms.
|
||
*
|
||
* @param string $search The string to search for in the database
|
||
* @param string $table The table which is currently edited
|
||
* @param string $field The field which is currently edited
|
||
* @param integer $uid The uid of the record which is currently edited (may be NEWxxxxxx)
|
||
* @param integer $pid The pid of the record which is currently edited (always numeric
|
||
* @param string $formfield The field which is edited
|
||
* @param array $params The parameters from the AJAX call
|
||
* @param TYPO3AJAX $ajaxObj The AJAX object representing the AJAX call
|
||
* @return void
|
||
*/
|
||
public function processAjaxRequest($params, &$ajaxObj) {
|
||
public function processAjaxRequest($params, &$ajaxObj) {
|
||
// get parameters from $_GET/$_POST
|
||
$search = t3lib_div::_GP('value');
|
t3lib/tceforms/class.t3lib_tceforms_suggest_defaultreceiver.php | ||
---|---|---|
/**
|
||
* The constructor of this class
|
||
*
|
||
* @param string $table
|
||
* @param array $config The configuration (TCA overlayed with TSconfig) to use for this selector
|
||
* @param string $table The table to query
|
||
* @param array $config The configuration (TCA overlayed with TSconfig) to use for this selector
|
||
* @return void
|
||
*/
|
||
public function __construct($table, $config) {
|
||
... | ... | |
* If you subclass this class, you will most likely only want to overwrite the functions called from here, but not
|
||
* this function itself
|
||
*
|
||
* @param array $params
|
||
* @param object $ref the parent object
|
||
* @return mixed array of rows or false if nothing found
|
||
* @param array $params
|
||
* @param object $ref The parent object
|
||
* @return mixed array of rows or false if nothing found
|
||
*/
|
||
public function queryTable(&$params, $recursionCounter = 0) {
|
||
$rows = array();
|
||
... | ... | |
* Prepare the statement for selecting the records which will be returned to the selector. May also return some
|
||
* other records (e.g. from a mm-table) which will be used later on to select the real records
|
||
*
|
||
* @return void
|
||
* @return void
|
||
*/
|
||
protected function prepareSelectStatement() {
|
||
$searchWholePhrase = $this->config['searchWholePhrase'];
|
||
... | ... | |
/**
|
||
* Selects all subpages of one page, optionally only upto a certain level
|
||
*
|
||
* @param integer $uid
|
||
* @param integer $depth
|
||
* @param integer $uid The uid of the page
|
||
* @param integer $depth The depth to select upto. Defaults to 99
|
||
* @return array of page IDs
|
||
*/
|
||
protected function getAllSubpagesOfPage($uid, $depth = 99) {
|
||
... | ... | |
/**
|
||
* Manipulate a record before using it to render the selector; may be used to replace a MM-relation etc.
|
||
*
|
||
* @param array $row
|
||
* @param array $row
|
||
*/
|
||
protected function manipulateRecord(&$row) {
|
||
}
|
||
... | ... | |
/**
|
||
* Overlay the given record with its workspace-version, if any
|
||
*
|
||
* @param array the record to get the workspace version for
|
||
* @return void (passed by reference)
|
||
* @param array The record to get the workspace version for
|
||
* @return void (passed by reference)
|
||
*/
|
||
protected function makeWorkspaceOverlay(&$row) {
|
||
// check for workspace-versions
|
||
... | ... | |
/**
|
||
* Return the icon for a record - just a wrapper for two functions from t3lib_iconWorks
|
||
*
|
||
* @param array $row The record to get the icon for
|
||
* @param array $row The record to get the icon for
|
||
* @return string The path to the icon
|
||
*/
|
||
protected function getIcon($row) {
|
||
... | ... | |
*
|
||
* The path is returned uncut, cutting has to be done by calling function.
|
||
*
|
||
* @param array $record The record
|
||
* @return string The record-path
|
||
* @param array $record The record
|
||
* @return string The record-path
|
||
*/
|
||
protected function getRecordPath(&$row) {
|
||
$titleLimit = max($this->config['maxPathTitleLength'], 0);
|
||
... | ... | |
/**
|
||
* Returns a label for a given record; usually only a wrapper for t3lib_BEfunc::getRecordTitle
|
||
*
|
||
* @param array $row
|
||
* @return The label for the record
|
||
* @param array $row The record to get the label for
|
||
* @return string The label
|
||
*/
|
||
protected function getLabel($row) {
|
||
return t3lib_BEfunc::getRecordTitle(($this->mmForeignTable ? $this->mmForeignTable : $this->table), $row, true);
|
||
... | ... | |
/**
|
||
* Calls a user function for rendering the page.
|
||
*
|
||
* This user function should manipulate $entry, especially $entry['text']
|
||
* This user function should manipulate $entry, especially $entry['text'].
|
||
*
|
||
* @param array $row The row
|
||
* @param array $entry The entry to render
|
||
* @param array $row The row
|
||
* @param array $entry The entry to render
|
||
* @return array The rendered entry (will be put into a <li> later on
|
||
*/
|
||
protected function renderRecord($row, $entry) {
|