GRIS_LISTS
in package
Class to manage statistical information and lists of publications in the database
With this class all statistical information can be shown or special lists can be created
PHP version 7
Copyright (c) 2012, Holger Heuser, GESIS Leibniz Institute for the Social Sciences Unter Sachsenhausen 6-8 50667 Cologne, Germany
Tags
Table of Contents
- settings_group = "lists"
- The constant for the settings group
- $dbconnection : object
- The database object for managing the connection
- $i18n : object
- The object for translations
- $listcount : int
- The count of list entries
- $listdepth : int
- The (array) depth of the returned list
- $organigram : object
- The organigram
- $publication : object
- The publication object
- $settings : object
- The object for settings
- $state : object
- The object for logs
- $template : object
- The object for templates
- __construct() : mixed
- The class constructor
- get_listcount() : int
- Returns the count of list items
- get_listdepth() : int
- Returns the depth of the list
- get_organigram() : mixed
- Get method for organigram object
- get_statistics() : array<string|int, mixed>
- Returns a list for statistics
- get_query() : string
- Returns a list of resources for statistics
- sort_table() : array<string|int, mixed>
- Returns a multisorted array
Constants
settings_group
The constant for the settings group
public
mixed
settings_group
= "lists"
Properties
$dbconnection
The database object for managing the connection
private
object
$dbconnection
= NULL
Tags
$i18n
The object for translations
private
object
$i18n
Tags
$listcount
The count of list entries
private
int
$listcount
Tags
$listdepth
The (array) depth of the returned list
private
int
$listdepth
Tags
$organigram
The organigram
private
object
$organigram
Tags
$publication
The publication object
private
object
$publication
Tags
$settings
The object for settings
private
object
$settings
= null
Tags
$state
The object for logs
private
object
$state
Tags
$template
The object for templates
private
object
$template
Tags
Methods
__construct()
The class constructor
public
__construct() : mixed
Initializes the objects
Return values
mixed —get_listcount()
Returns the count of list items
public
get_listcount() : int
Return values
int —The count of entries
get_listdepth()
Returns the depth of the list
public
get_listdepth() : int
Return values
int —The amount of array levels
get_organigram()
Get method for organigram object
public
get_organigram() : mixed
Return values
mixed —The attribute
get_statistics()
Returns a list for statistics
public
get_statistics(bool $teams, array<string|int, mixed> $all_resourcetypes) : array<string|int, mixed>
Parameters
- $teams : bool
-
Use teams (not only departments)
- $all_resourcetypes : array<string|int, mixed>
-
The list af allavailable resourcetypes
Return values
array<string|int, mixed> —The list of resources
get_query()
Returns a list of resources for statistics
private
get_query(array<string|int, mixed> $personname_list, array<string|int, mixed> $resourcetypes, bool $all_years, string $filter_years) : string
Parameters
- $personname_list : array<string|int, mixed>
-
The list of personnames
- $resourcetypes : array<string|int, mixed>
-
The list of resource types (or int for one resource type)
- $all_years : bool
-
Use all year (true) or a range (false)
- $filter_years : string
-
The query string for the range of years
Return values
string —The SQL query
sort_table()
Returns a multisorted array
private
sort_table(array<string|int, mixed> $data, array<string|int, mixed> $fields) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
The unsorted table array
- $fields : array<string|int, mixed>
-
The fields to be sorted
Return values
array<string|int, mixed> —The sorted array