Class ilTermsOfServiceAcceptanceHistoryProvider.
More...
|
| getSelectPart (array $params, array $filter) |
|
| getFromPart (array $params, array $filter) |
|
| getWherePart (array $params, array $filter) |
|
| getGroupByPart (array $params, array $filter) |
|
| getHavingPart (array $params, array $filter) |
|
| getOrderByPart (array $params, array $filter) |
|
| getSelectPart (array $params, array $filter) |
|
| getFromPart (array $params, array $filter) |
|
| getWherePart (array $params, array $filter) |
|
| getGroupByPart (array $params, array $filter) |
|
| getHavingPart (array $params, array $filter) |
|
| getOrderByPart (array $params, array $filter) |
|
◆ getFromPart()
ilTermsOfServiceAcceptanceHistoryProvider::getFromPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
protected |
Definition at line 33 of file class.ilTermsOfServiceAcceptanceHistoryProvider.php.
36 'INNER JOIN tos_acceptance_track ON tos_acceptance_track.usr_id = ud.usr_id',
37 'INNER JOIN tos_versions ON tos_versions.id = tos_acceptance_track.tosv_id',
38 'LEFT JOIN tos_documents ON tos_documents.id = tos_versions.doc_id',
41 return 'usr_data ud ' . implode(
' ', $joins);
◆ getGroupByPart()
ilTermsOfServiceAcceptanceHistoryProvider::getGroupByPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
protected |
◆ getHavingPart()
ilTermsOfServiceAcceptanceHistoryProvider::getHavingPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
protected |
◆ getOrderByPart()
ilTermsOfServiceAcceptanceHistoryProvider::getOrderByPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
protected |
Definition at line 104 of file class.ilTermsOfServiceAcceptanceHistoryProvider.php.
106 if (isset(
$params[
'order_field'])) {
107 if (!is_string(
$params[
'order_field'])) {
111 if (in_array(
$params[
'order_field'], [
'lng',
'src'])) {
116 if (!in_array(
$params[
'order_field'], [
'login',
'firstname',
'lastname',
'title',
'ts'])) {
120 if (
$params[
'order_field'] ==
'ts') {
121 $params[
'order_field'] =
'tos_acceptance_track.ts';
124 if (!isset(
$params[
'order_direction'])) {
125 $params[
'order_direction'] =
'ASC';
127 if (!in_array(strtolower(
$params[
'order_direction']), [
'asc',
'desc'])) {
◆ getSelectPart()
ilTermsOfServiceAcceptanceHistoryProvider::getSelectPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
protected |
Definition at line 13 of file class.ilTermsOfServiceAcceptanceHistoryProvider.php.
16 'tos_acceptance_track.tosv_id',
17 'tos_acceptance_track.criteria',
18 'tos_acceptance_track.ts',
23 '(CASE WHEN tos_documents.title IS NOT NULL THEN tos_documents.title ELSE tos_versions.title END) title',
27 return implode(
', ', $fields);
◆ getWherePart()
ilTermsOfServiceAcceptanceHistoryProvider::getWherePart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
protected |
Definition at line 47 of file class.ilTermsOfServiceAcceptanceHistoryProvider.php.
51 if (isset($filter[
'query']) && strlen($filter[
'query'])) {
52 $where[] =
'(' . implode(
' OR ', [
53 $this->db->like(
'ud.login',
'text',
'%' . $filter[
'query'] .
'%'),
54 $this->db->like(
'ud.firstname',
'text',
'%' . $filter[
'query'] .
'%'),
55 $this->db->like(
'ud.lastname',
'text',
'%' . $filter[
'query'] .
'%'),
56 $this->db->like(
'ud.email',
'text',
'%' . $filter[
'query'] .
'%')
60 if (isset($filter[
'period']) && is_array($filter[
'period'])) {
61 $dateFilterParts = [];
63 if (null !== $filter[
'period'][
'start']) {
64 $dateFilterParts[] =
'tos_acceptance_track.ts >= ' . $this->db->quote(
65 $filter[
'period'][
'start'],
70 if (null !== $filter[
'period'][
'end']) {
71 $dateFilterParts[] =
'tos_acceptance_track.ts <= ' . $this->db->quote(
72 $filter[
'period'][
'end'],
77 if (count($dateFilterParts) > 0) {
78 $where[] =
'(' . implode(
' AND ', $dateFilterParts) .
')';
82 return implode(
' AND ', $where);
The documentation for this class was generated from the following file: