TYPO3
7.6
|
Public Member Functions | |
__construct () | |
findPage ($searchQuery) | |
find ($searchQuery) | |
getRecordTitlePrep ($title, $titleLength=0) | |
getQueryString ($tableName= '') | |
setLimitCount ($limitCount) | |
setStartCount ($startCount) | |
setQueryString ($queryString) | |
Public Attributes | |
const | PAGE_JUMP_TABLE = 'pages' |
const | RECURSIVE_PAGE_LEVEL = 99 |
const | GROUP_TITLE_MAX_LENGTH = 15 |
const | RECORD_TITLE_MAX_LENGTH = 28 |
Protected Member Functions | |
findPageById ($id) | |
findByGlobalTableList ($pageIdList) | |
findByTable ($tableName, $pageIdList, $limit) | |
getRecordArray ($tableName, $where, $orderBy, $limit) | |
getEditLink ($tableName, $row) | |
getTitleOfCurrentRecordType ($tableName) | |
makeQuerySearchByTable ($tableName, array $fieldsToSearchWithin) | |
makeOrderByTable ($tableName) | |
extractSearchableFieldsFromTable ($tableName) | |
getAvailablePageIds ($id, $depth) | |
Protected Attributes | |
$userPermissions = '' | |
$queryParser = null | |
Private Attributes | |
$queryString = '' | |
$startCount = 0 | |
$limitCount = 5 | |
Class for handling backend live search.
Definition at line 27 of file LiveSearch.php.
__construct | ( | ) |
Initialize access settings
Definition at line 77 of file LiveSearch.php.
References $GLOBALS, and GeneralUtility\makeInstance().
|
protected |
Get all fields from given table where we can search for.
string | $tableName | Name of the table for which to get the searchable fields |
Definition at line 388 of file LiveSearch.php.
References $GLOBALS, and GeneralUtility\trimExplode().
Referenced by LiveSearch\findByTable().
find | ( | $searchQuery | ) |
Find records from database based on the given $searchQuery.
string | $searchQuery |
Definition at line 106 of file LiveSearch.php.
References $GLOBALS, LiveSearch\$limitCount, LiveSearch\findByGlobalTableList(), LiveSearch\findByTable(), LiveSearch\getAvailablePageIds(), and LiveSearch\setQueryString().
|
protected |
Find records from all registered TCA table & column values.
string | $pageIdList | Comma separated list of page IDs |
Definition at line 152 of file LiveSearch.php.
References $GLOBALS, LiveSearch\$limitCount, and LiveSearch\findByTable().
Referenced by LiveSearch\find().
|
protected |
Find records by given table name.
string | $tableName | Database table name |
string | $pageIdList | Comma separated list of page IDs |
string | $limit | MySql Limit notation |
Definition at line 186 of file LiveSearch.php.
References LiveSearch\extractSearchableFieldsFromTable(), LiveSearch\getRecordArray(), LiveSearch\makeOrderByTable(), and LiveSearch\makeQuerySearchByTable().
Referenced by LiveSearch\find(), and LiveSearch\findByGlobalTableList().
findPage | ( | $searchQuery | ) |
Find records from database based on the given $searchQuery.
string | $searchQuery |
Definition at line 89 of file LiveSearch.php.
References LiveSearch\findPageById(), and LiveSearch\getEditLink().
|
protected |
Retrieve the page record from given $id.
int | $id |
Definition at line 136 of file LiveSearch.php.
References BackendUtility\getRecord().
Referenced by LiveSearch\findPage().
|
protected |
Creates an instance of which will select a page tree to $depth and return the object. In that object we will find the ids of the tree.
int | $id | Page id. |
int | $depth | Depth to go down. |
Definition at line 460 of file LiveSearch.php.
References GeneralUtility\makeInstance().
Referenced by LiveSearch\find().
|
protected |
Build a backend edit link based on given record.
string | $tableName | Record table name |
array | $row | Current record row from database. |
Definition at line 247 of file LiveSearch.php.
References $GLOBALS, Permission\CONTENT_EDIT, BackendUtility\getRecord(), Permission\PAGE_EDIT, and BackendUtility\readPageAccess().
Referenced by LiveSearch\findPage(), and LiveSearch\getRecordArray().
getQueryString | ( | $tableName = '' | ) |
Safely retrieve the queryString.
string | $tableName |
Definition at line 410 of file LiveSearch.php.
References $GLOBALS.
|
protected |
Process the Database operation to get the search result.
string | $tableName | Database table name |
string | $where | |
string | $orderBy | |
string | $limit | MySql Limit notation |
Definition at line 209 of file LiveSearch.php.
References $GLOBALS, LiveSearch\getEditLink(), BackendUtility\getRecordTitle(), LiveSearch\getTitleOfCurrentRecordType(), GeneralUtility\makeInstance(), and Icon\SIZE_SMALL.
Referenced by LiveSearch\findByTable().
getRecordTitlePrep | ( | $title, | |
$titleLength = 0 |
|||
) |
Crops a title string to a limited length and if it really was cropped, wrap it in a |, which offers a tooltip with the original title when moving mouse over it.
string | $title | The title string to be cropped |
int | $titleLength | Crop title after this length - if not set, BE_USER->uc['titleLen'] is used |
Definition at line 289 of file LiveSearch.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), and GeneralUtility\fixed_lgd_cs().
|
protected |
Retrieve the record name
string | $tableName | Record table name |
Definition at line 275 of file LiveSearch.php.
References $GLOBALS.
Referenced by LiveSearch\getRecordArray().
|
protected |
Build the MySql ORDER BY statement.
string | $tableName | Record table name |
Definition at line 368 of file LiveSearch.php.
References $GLOBALS.
Referenced by LiveSearch\findByTable().
|
protected |
Build the MySql where clause by table.
string | $tableName | Record table name |
array | $fieldsToSearchWithin | User right based visible fields where we can search within. |
Definition at line 305 of file LiveSearch.php.
References $GLOBALS, LiveSearch\$queryString, MathUtility\canBeInterpretedAsInteger(), BackendUtility\deleteClause(), elseif, GeneralUtility\inList(), and BackendUtility\versioningPlaceholderClause().
Referenced by LiveSearch\findByTable().
setLimitCount | ( | $limitCount | ) |
Setter for limit value.
int | $limitCount |
Definition at line 421 of file LiveSearch.php.
References LiveSearch\$limitCount, and MathUtility\convertToPositiveInteger().
setQueryString | ( | $queryString | ) |
Setter for the search query string.
string | $queryString |
Definition at line 447 of file LiveSearch.php.
References LiveSearch\$queryString, and GeneralUtility\removeXSS().
Referenced by LiveSearch\find().
setStartCount | ( | $startCount | ) |
Setter for start count value.
int | $startCount |
Definition at line 435 of file LiveSearch.php.
References LiveSearch\$startCount, and MathUtility\convertToPositiveInteger().
|
private |
Definition at line 62 of file LiveSearch.php.
Referenced by LiveSearch\find(), LiveSearch\findByGlobalTableList(), and LiveSearch\setLimitCount().
|
protected |
Definition at line 72 of file LiveSearch.php.
|
private |
Definition at line 52 of file LiveSearch.php.
Referenced by LiveSearch\makeQuerySearchByTable(), and LiveSearch\setQueryString().
|
private |
Definition at line 57 of file LiveSearch.php.
Referenced by LiveSearch\setStartCount().
|
protected |
Definition at line 67 of file LiveSearch.php.
const GROUP_TITLE_MAX_LENGTH = 15 |
Definition at line 42 of file LiveSearch.php.
const PAGE_JUMP_TABLE = 'pages' |
Definition at line 32 of file LiveSearch.php.
const RECORD_TITLE_MAX_LENGTH = 28 |
Definition at line 47 of file LiveSearch.php.
const RECURSIVE_PAGE_LEVEL = 99 |
Definition at line 37 of file LiveSearch.php.