Public Member Functions |
| __construct ($config, $parentBase, $section_id, $translationTable, $flavours, $queries, $propertiesSection, $refresh=false) |
| getPageContent () |
| afterSection () |
Static Public Member Functions |
static | renderCustomFilter ($custom_filter, $q, $translationTable, $template_path, $flavour_id=null) |
static | getArticleControls ($flavour_id, $query, $custom_filters, $translationTable, $template_path, $user, $bf_link=false) |
static | getFiltering ($flavour_id, $query, $custom_filters, $translationTable, $template_path, $bf_link=false) |
static | getSourcesList ($current, $queries, $template_file, $translationTable) |
static | setFlavour ($section, $query) |
Data Fields |
const | NO_SOURCE = '<!--No source to change-->' |
Protected Attributes |
| $refresh |
Constructor & Destructor Documentation
__construct |
( |
$ |
config, |
|
|
$ |
parentBase, |
|
|
$ |
section_id, |
|
|
$ |
translationTable, |
|
|
$ |
flavours, |
|
|
$ |
queries, |
|
|
$ |
propertiesSection, |
|
|
$ |
refresh = false |
|
) |
| |
Constructs the object
- Parameters:
-
array | $config | The configuration array |
string | $parentBase | base_folder of the container class |
string | $section_id | The section identifier |
array | $translationTable | The translation table |
| Flavour[] | The list of flavours |
| Query[][] | The list of queries grouped by queries |
string | $propertiesSection | The properties section (to read the user defined filters and queries from the user preferences) |
boolean | $refresh | If true, then refresh the news from the section [OPTIONAL] public |
- Returns:
- void
Member Function Documentation
If you want to display something after a section, just redefine this function and return the HTML to be displayed public
- Returns:
- string
Reimplemented from tariqa3ModuleSection.
static getArticleControls |
( |
$ |
flavour_id, |
|
|
$ |
query, |
|
|
$ |
custom_filters, |
|
|
$ |
translationTable, |
|
|
$ |
template_path, |
|
|
$ |
user, |
|
|
$ |
bf_link = false |
|
) |
| [static] |
Gets the article controls links html of a query block
- Parameters:
-
int | $flavour_id | The flavour id (which is basically the tab on which the query is displayed) |
Query | $query | The query |
array | $custom_filters | The custom filters (it is possible that a filter is allready set) |
array | $translationTable | The translation table |
string | $template_path | The path to the template files |
tariqaUser | $user | The tariqa user |
boolean | $bf_link | If true, also include the briefcase link public |
- Returns:
- array
static getFiltering |
( |
$ |
flavour_id, |
|
|
$ |
query, |
|
|
$ |
custom_filters, |
|
|
$ |
translationTable, |
|
|
$ |
template_path, |
|
|
$ |
bf_link = false |
|
) |
| [static] |
Gets the filtering html of a query block
- Parameters:
-
int | $flavour_id | The flavour id (which is basically the tab on which the query is displayed) |
Query | $query | The query |
array | $custom_filters | The custom filters (it is possible that a filter is allready set) |
array | $translationTable | The translation table |
string | $template_path | The path to the template files |
boolean | $bf_link | If true, also include the briefcase link public |
- Returns:
- array
Render the module
- Returns:
- string
Reimplemented from tariqa3Module.
static getSourcesList |
( |
$ |
current, |
|
|
$ |
queries, |
|
|
$ |
template_file, |
|
|
$ |
translationTable |
|
) |
| [static] |
Generates the div with the list of sources ommiting the current query source for a given flavour
- Parameters:
-
Query | $current | The current query (this will not be displayed in the list |
| Query[] | $queries The list of queries |
string | $template_file | The template file to generate the sources list HTML |
array | $translationTable | The translation table public |
- Returns:
- array
static renderCustomFilter |
( |
$ |
custom_filter, |
|
|
$ |
q, |
|
|
$ |
translationTable, |
|
|
$ |
template_path, |
|
|
$ |
flavour_id = null |
|
) |
| [static] |
Renders a custom filter for a flavour in the country page or theme page (returns an associative array with the HTML code needed to display the filter, the query string, the start date (UNIX timestamp format) and the end date (UNIX timestamp format)
- Parameters:
-
string | $custom_filter | The custom filter from the database (in URL form - query=lower(title) like obama&start_date=...&end_date=...) |
Query | $q | The query identifier to filter |
array | $translationTable | The translation table |
string | $template_path | The path to the template file |
int | $flavour_id | The flavour identifier (this has been added due to a small bug in the query table - it contains the flavour_id) [OPTIONAL] public |
- Returns:
- array
Sets the flavour for a query flavour (if we display the news section for example into the theme pages, then the flavours are just the name and id of the tabs, and not the flavours from the database)
- Parameters:
-
array | $section | The section (this will indicate if we are on a country page, on a theme page etc. |
Query | $query | The query for which we are trying to get the flavour public |
- Returns:
- void
Field Documentation
const NO_SOURCE = '<!--No source to change-->' |
The documentation for this class was generated from the following file: