See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 403]
View user acceptances to the policies
Copyright: | 2018 Marina Glancy |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 649 lines (25 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
acceptances_table:: (24 methods):
__construct()
get_sort_columns()
add_column_header()
configure_for_single_version()
configure_for_multiple_versions()
download()
get_sql_where()
build_sql_for_search_string()
build_sql_for_capability_filter()
sql_has_role()
build_sql_for_roles_filter()
wrap_html_start()
wrap_html_finish()
display()
format_row()
col_fullname()
username()
get_return_url()
status()
col_timemodified()
col_note()
col_statusall()
col_country()
other_cols()
Class: acceptances_table - X-Ref
Class acceptances_table__construct($uniqueid, acceptances_filter $acceptancesfilter, renderer $output) X-Ref |
Constructor. param: string $uniqueid Table identifier. param: acceptances_filter $acceptancesfilter param: renderer $output |
get_sort_columns() X-Ref |
Remove randomness from the list by always sorting by user id in the end return: array |
add_column_header($key, $label, $sortable = true, $columnclass = '') X-Ref |
Allows to add only one column name and header to the table (parent class methods only allow to set all). param: string $key param: string $label param: bool $sortable param: string $columnclass |
configure_for_single_version() X-Ref |
Helper configuration method. |
configure_for_multiple_versions() X-Ref |
Helper configuration method. |
download() X-Ref |
Download the data. |
get_sql_where() X-Ref |
Get sql to add to where statement. return: string |
build_sql_for_search_string($userfields) X-Ref |
Helper SQL query builder. param: array $userfields |
build_sql_for_capability_filter() X-Ref |
If there is a filter to find users who can/cannot accept on their own behalf add it to the SQL query |
sql_has_role($roles, $positive = true) X-Ref |
Returns SQL snippet for users that have (do not have) one of the given roles in the system context param: array $roles list of roles indexed by role id param: bool $positive true: return users who HAVE roles; false: return users who DO NOT HAVE roles return: string |
build_sql_for_roles_filter() X-Ref |
If there is a filter by user roles add it to the SQL query. |
wrap_html_start() X-Ref |
Hook that can be overridden in child classes to wrap a table in a form for example. Called only when there is data to display and not downloading. |
wrap_html_finish() X-Ref |
Hook that can be overridden in child classes to wrap a table in a form for example. Called only when there is data to display and not downloading. |
display() X-Ref |
Render the table. |
format_row($row) X-Ref |
Call appropriate methods on this table class to perform any processing on values before displaying in table. Takes raw data from the database and process it into human readable format, perhaps also adding html linking when displaying table as html, adding a div wrap, etc. See for example col_fullname below which will be called for a column whose name is 'fullname'. param: array|object $row row of data from db used to make one row of the table. return: array one row for the table, added using add_data_keyed method. |
col_fullname($row) X-Ref |
Get the column fullname value. param: stdClass $row return: string |
username($user, $profilelink = true) X-Ref |
User name with a link to profile param: stdClass $user param: bool $profilelink show link to profile (when we are downloading never show links) return: string |
get_return_url() X-Ref |
Helper. |
status($versionid, $row) X-Ref |
Return agreement status param: int $versionid either id of an individual version or empty for overall status param: stdClass $row return: string |
col_timemodified($row) X-Ref |
Get the column timemodified value. param: stdClass $row return: string |
col_note($row) X-Ref |
Get the column note value. param: stdClass $row return: string |
col_statusall($row) X-Ref |
Get the column statusall value. param: stdClass $row return: string |
col_country($data) X-Ref |
Generate the country column. param: \stdClass $data return: string |
other_cols($column, $row) X-Ref |
You can override this method in a child class. See the description of build_table which calls this method. param: string $column param: stdClass $row return: string |