Handles Ajax requests for text findings.
More...
|
| __construct ($uploadTreeTableName) |
|
| doGetData ($type, $upload, $activated=true) |
| Handles GET request and create a JSON response. More...
|
|
|
| getTableData ($upload, $item, $type, $listPage, $filter, $activated=true) |
| Get the text finding data and fill in expected format. More...
|
|
| getOrderString () |
| Create sorting string for database query. More...
|
|
| addSearchFilter (&$filterParams) |
| Add filter on content. More...
|
|
| getTableRowAction ($hash, $upload, $type, $activated=true, $rw=true) |
| Helper to create action column for results. More...
|
|
| fillTableRow ($row, $upload, $item, $type, $listPage, $activated=true, $rw=true) |
| Fill table content for JSON response. More...
|
|
| getTableName ($type) |
| Get table name based on decision type. More...
|
|
| getDecisionTypeName ($type) |
| Get type name for ajax calls based. More...
|
|
| getViewName ($type) |
| Get name of view for links. More...
|
|
Handles Ajax requests for text findings.
Definition at line 21 of file TextFindingsAjax.php.
◆ addSearchFilter()
Fossology\Agent\Copyright\UI\TextFindingsAjax::addSearchFilter |
( |
& |
$filterParams | ) |
|
|
private |
Add filter on content.
- Parameters
-
[out] | array | $filterParams | Parameters list for database query |
- Returns
- string Filter string for query
Definition at line 227 of file TextFindingsAjax.php.
◆ doGetData()
Fossology\Agent\Copyright\UI\TextFindingsAjax::doGetData |
( |
|
$type, |
|
|
|
$upload, |
|
|
|
$activated = true |
|
) |
| |
Handles GET request and create a JSON response.
Gets the text finding history for given upload and generate a JSONResponse using getTableData()
- Parameters
-
string | $type | The text finding type ('copyright') |
int | $upload | Upload id to fetch results |
bool | $activated | True to get activated results, false for disabled |
- Returns
- JsonResponse JSON response for JavaScript
Definition at line 64 of file TextFindingsAjax.php.
◆ fillTableRow()
Fossology\Agent\Copyright\UI\TextFindingsAjax::fillTableRow |
( |
|
$row, |
|
|
|
$upload, |
|
|
|
$item, |
|
|
|
$type, |
|
|
|
$listPage, |
|
|
|
$activated = true , |
|
|
|
$rw = true |
|
) |
| |
|
private |
Fill table content for JSON response.
- Parameters
-
array | $row | Result row from database |
int | $upload | Upload id |
int | $item | Upload tree id of the item |
string | $type | The text finding type ('copyright') |
string | $listPage | Page slug |
boolean | $activated | True to get activated results, false otherwise |
- Returns
- string[]
Definition at line 285 of file TextFindingsAjax.php.
◆ getDecisionTypeName()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getDecisionTypeName |
( |
|
$type | ) |
|
|
private |
Get type name for ajax calls based.
- copyFindings => copyright
- Parameters
-
- Returns
- string Table name
Definition at line 341 of file TextFindingsAjax.php.
◆ getOrderString()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getOrderString |
( |
| ) |
|
|
private |
Create sorting string for database query.
- Returns
- string Sorting string
Definition at line 209 of file TextFindingsAjax.php.
◆ getTableData()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getTableData |
( |
|
$upload, |
|
|
|
$item, |
|
|
|
$type, |
|
|
|
$listPage, |
|
|
|
$filter, |
|
|
|
$activated = true |
|
) |
| |
|
private |
Get the text finding data and fill in expected format.
- Parameters
-
int | $upload | Upload id to get results from |
int | $item | Upload tree id of the item |
string | $type | The text finding type ('copyright') |
string | $listPage | Page slug to use |
string | $filter | Filter data from query |
boolean | $activated | True to get activated copyrights, else false |
- Returns
- array[][] Array of table data, total records in database, filtered records
Definition at line 92 of file TextFindingsAjax.php.
◆ getTableName()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getTableName |
( |
|
$type | ) |
|
|
private |
Get table name based on decision type.
- copyFindings => copyright_decision
- Parameters
-
- Returns
- string Table name
Definition at line 329 of file TextFindingsAjax.php.
◆ getTableRowAction()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getTableRowAction |
( |
|
$hash, |
|
|
|
$upload, |
|
|
|
$type, |
|
|
|
$activated = true , |
|
|
|
$rw = true |
|
) |
| |
|
private |
Helper to create action column for results.
- Parameters
-
string | $hash | Unique hash of the decision |
int | $upload | Upload id |
string | $type | The text finding type ('copyright') |
boolean | $activated | True if content is activated, else false |
boolean | $rw | true if content is editable |
- Returns
- string
Definition at line 246 of file TextFindingsAjax.php.
◆ getTextFindings()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getTextFindings |
( |
|
$upload_pk, |
|
|
|
$item, |
|
|
|
$type, |
|
|
|
$uploadTreeTableName, |
|
|
|
$filter, |
|
|
|
$activated = true |
|
) |
| |
|
protected |
Get results from database and format for JSON.
- Parameters
-
int | $upload_pk | Upload id to get results from |
int | $item | Upload tree id of the item |
string | $type | The text finding type ('copyright') |
string | $uploadTreeTableName | Upload tree table to use |
string | $filter | Filter data from query |
boolean | $activated | True to get activated copyrights, else false |
- Returns
- array[][] Array of table records, filtered records, total records
Definition at line 123 of file TextFindingsAjax.php.
◆ getViewName()
Fossology\Agent\Copyright\UI\TextFindingsAjax::getViewName |
( |
|
$type | ) |
|
|
private |
Get name of view for links.
- copyFindings => copyright-view
- Parameters
-
- Returns
- string View name
Definition at line 353 of file TextFindingsAjax.php.
◆ $copyrightDao
CopyrightDao Fossology\Agent\Copyright\UI\TextFindingsAjax::$copyrightDao |
|
private |
◆ $dataTablesUtility
◆ $dbManager
DbManager Fossology\Agent\Copyright\UI\TextFindingsAjax::$dbManager |
|
private |
◆ $uploadDao
Fossology\Agent\Copyright\UI\TextFindingsAjax::$uploadDao |
|
private |
◆ $uploadtree_tablename
string Fossology\Agent\Copyright\UI\TextFindingsAjax::$uploadtree_tablename |
|
private |
The documentation for this class was generated from the following file: