Function __global->get_rating_simple_array
Definitions
sources/feedback.php
- Get rating information for the specified resource.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $content_url | mixed | No | No | required parameter | N/A | N/A | The URL to where the commenting will pass back to (to put into the comment topic header) (URLPATH or Tempcode) |
| $content_title | ?string | No | No | required parameter | N/A | N/A | The title to where the commenting will pass back to (to put into the comment topic header) (null: don't know, but not first post so not important) |
| $feedback_type | ID_TEXT | No | No | required parameter | N/A | N/A | The type (downloads, etc) that this rating is for |
| $content_id | ID_TEXT | No | No | required parameter | N/A | N/A | The ID of the type that this rating is for |
| $form_tpl | ?ID_TEXT | No | No | RATING_FORM | N/A | N/A | The template to use to display the rating box (null: none) |
| $submitter | ?MEMBER | No | No | Null | N/A | N/A | Content owner (null: none) |
Returns
- Current rating information (ready to be passed into a template). RATING is the rating (out of 10), NUM_RATINGS is the number of ratings so far, RATING_FORM is the Tempcode of the rating box (null: rating disabled)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get rating information for the specified resource.
*
* @param mixed $content_url The URL to where the commenting will pass back to (to put into the comment topic header) (URLPATH or Tempcode)
* @param ?string $content_title The title to where the commenting will pass back to (to put into the comment topic header) (null: don't know, but not first post so not important)
* @param ID_TEXT $feedback_type The type (downloads, etc) that this rating is for
* @param ID_TEXT $content_id The ID of the type that this rating is for
* @param ?ID_TEXT $form_tpl The template to use to display the rating box (null: none)
* @param ?MEMBER $submitter Content owner (null: none)
* @return ?array Current rating information (ready to be passed into a template). RATING is the rating (out of 10), NUM_RATINGS is the number of ratings so far, RATING_FORM is the Tempcode of the rating box (null: rating disabled)
*/
function get_rating_simple_array($content_url, ?string $content_title, string $feedback_type, string $content_id, ?string $form_tpl = 'RATING_FORM', ?int $submitter = null) : ?array
* Get rating information for the specified resource.
*
* @param mixed $content_url The URL to where the commenting will pass back to (to put into the comment topic header) (URLPATH or Tempcode)
* @param ?string $content_title The title to where the commenting will pass back to (to put into the comment topic header) (null: don't know, but not first post so not important)
* @param ID_TEXT $feedback_type The type (downloads, etc) that this rating is for
* @param ID_TEXT $content_id The ID of the type that this rating is for
* @param ?ID_TEXT $form_tpl The template to use to display the rating box (null: none)
* @param ?MEMBER $submitter Content owner (null: none)
* @return ?array Current rating information (ready to be passed into a template). RATING is the rating (out of 10), NUM_RATINGS is the number of ratings so far, RATING_FORM is the Tempcode of the rating box (null: rating disabled)
*/
function get_rating_simple_array($content_url, ?string $content_title, string $feedback_type, string $content_id, ?string $form_tpl = 'RATING_FORM', ?int $submitter = null) : ?array
