◆ __construct()
Constructor initialized with page configuration.
- Parameters
-
◆ __get()
Magic method to get a value by given name from configuration.
- Parameters
-
string | $field | The name of the field. |
- Returns
- mixed The value of the field.
◆ __set()
__set |
( |
string |
$field, |
|
|
|
$value |
|
) |
| |
Magic method to set a field in the configuration by given value.
- Parameters
-
string | $field | The field name. |
mixed | $value | The value. |
◆ argsToArray()
static argsToArray |
( |
string |
$args | ) |
|
|
staticprotected |
Convert string with allowed arguments to array with name as key and type as value.
- Parameters
-
$args | string String with allowed arguments. |
- Returns
- array Associative array with arguments.
◆ get()
Factory to get ExternPage object from config.
- Parameters
-
- Returns
- ExternPage The module depending on config.
- Exceptions
-
◆ getAllowedRequestParams()
getAllowedRequestParams |
( |
bool |
$as_array = false | ) |
|
|
abstract |
Returns a list (as string or array) with all names of config fields overridable by request parameters.
- Parameters
-
false | $as_array | True to get request params as array. |
- Returns
- string|string[]|void All allowed request params as array or string.
◆ getConfigFields()
getConfigFields |
( |
bool |
$as_array = false | ) |
|
|
abstract |
Returns an array or csv list of all parameter names and types used in the form to configure this external page. Used by Request::extract().
- See also
- Request::extract()
- Parameters
-
false | $as_array | True to get config fields as array. |
- Returns
- array|string An array or csv list of all field names and types.
◆ getContentMembers()
getContentMembers |
( |
Course |
$course, |
|
|
|
$status |
|
) |
| |
|
protected |
Retrieves content of all members of given status as content array.
- Parameters
-
Course | $course | The course. |
string | $status | Status of membership. |
- Returns
- array Array with content of course members.
◆ getDatafieldMarkers()
Returns all markers with content from datafields related with the given object. The name of the marker begins with DATFIELD_ followed by the id of the datafield.
- Parameters
-
- Returns
- array Markers for datafields.
◆ getDataFields()
getDataFields |
( |
array |
$object_classes = [] | ) |
|
Returns all datafields for the given datafield classes.
- Parameters
-
array | $object_classes | Array of datafield class names. |
- Returns
- DataField[] All datafields for given classes.
◆ getGroupedSemTypes()
static getGroupedSemTypes |
( |
| ) |
|
|
static |
Returns types of courses grouped by classes.
- Returns
- array The grouped types.
◆ getInstitutes()
Returns an array of institutes names as values and their IDs as keys.
- Exceptions
-
UnexpectedValueException; | |
- Returns
- array|false
◆ getInstitutesSQL()
getInstitutesSQL |
( |
array & |
$params | ) |
|
|
protected |
Returns SQL snippet to filter seminars by institutes if institute ids are stored in configuration. If no institutes stored in configuration it returns an empty string.
- Parameters
-
array | $params | Parameters of SQL statement. |
- Returns
- string SQL snippet or empty string if no institute is configured.
◆ getMarkersContents()
Returns an array with all content ready to feed it to the template.
- Returns
- array Array with content of all markers used in template.
◆ getScopesSQL()
getScopesSQL |
( |
array & |
$params, |
|
|
array |
$scopes, |
|
|
bool |
$with_kids |
|
) |
| |
|
protected |
Returns SQL snippet to filter by study areas.
- Parameters
-
array | $params | Array with query parameters. |
array | $scopes | Array with selected scopes. |
bool | $with_kids | Returns all descendent ids of the given scopes. |
- Returns
- string SQL snippet or empty string if no study area is configured.
- Exceptions
-
◆ getSemesters()
Returns an array of semester ids depending on config value.
- Returns
- array Array of semester ids.
◆ getSortFields()
Returns an associative array with field names as keys and the spoken name of fields as value. The output can be sorted by these values.
- Returns
- array Array of field names as keys and spoken names as values.
◆ getStudyAreaPaths()
getStudyAreaPaths |
( |
string |
$delimiter = ' , |
|
|
' |
|
|
) |
| |
Returns an associative array with area ids as keys and the area paths up to tree root as value.
- Parameters
-
string | $delimiter | Delimiter between area names in path. |
- Returns
- array Array with area id as index and paths as value.
- Exceptions
-
◆ getValue()
getValue |
( |
string |
$field | ) |
|
Get a value from the configuration of this external page.
- Parameters
-
string | $field | The name of the field. |
- Returns
- mixed The value of the field.
◆ setRequestParams()
Extract the allowed request params and overwrites the values from configuration.
◆ setValue()
setValue |
( |
string |
$field, |
|
|
|
$value |
|
) |
| |
Sets a value in the config storage by given field name.
- Parameters
-
string | $field | The name of the field. |
mixed | $value | The value to set. |
◆ store()
Stores the configuration.
- Returns
- number|boolean
◆ toString()
Returns the processed template with all data from this external page.
- Returns
- string The processed template with content inserted.
◆ $page_config
The documentation for this class was generated from the following file: