$components
$components : array
Required components
Controller of the QuestsAgent to display Quests.
$log : \nre\core\Logger
Logger instance
$linker : \nre\core\Linker
Linker instance
$agent : \nre\core\Agent
Corresponding Agent
$view : \nre\core\View
View of the Controller
$request : \nre\core\Request
Current request
$response : \nre\core\Response
Current response
preFilter(\nre\core\Request $request, \nre\core\Response $response)
Prefilter that is executed before running the Controller.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
postFilter(\nre\core\Request $request, \nre\core\Response $response)
Prefilter that is executed after running the Controller.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
factory(string $controllerName, string $layoutName, string $action, string $agent)
Instantiate a Controller (Factory Pattern).
string | $controllerName | Name of the Controller to instantiate |
string | $layoutName | Name of the current Layout |
string | $action | Current Action |
string | $agent | Corresponding Agent |
run(\nre\core\Request $request, \nre\core\Response $response)
Run the Controller.
This method executes the Action of the Controller defined by the current Request.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
quest(string $seminaryUrl, string $questgroupUrl, string $questUrl, string $questtexttypeUrl = null, integer $questtextPos = 1)
Action: quest.
Show a quest and its task.
string | $seminaryUrl | URL-Title of Seminary |
string | $questgroupUrl | URL-Title of Questgroup |
string | $questUrl | URL-Title of Quest |
string | $questtexttypeUrl | URL-Title of Questtexttype |
integer | $questtextPos | Position of Questtext |
submissions(string $seminaryUrl, string $questgroupUrl, string $questUrl)
List Character submissions for a Quest.
string | $seminaryUrl | URL-Title of Seminary |
string | $questgroupUrl | URL-Title of Questgroup |
string | $questUrl | URL-Title of Quest |
submission(string $seminaryUrl, string $questgroupUrl, string $questUrl, string $characterUrl)
Show and handle the submission of a Character for a Quest.
string | $seminaryUrl | URL-Title of Seminary |
string | $questgroupUrl | URL-Title of Questgroup |
string | $questUrl | URL-Title of Quest |
string | $characterUrl | URL-Title of Character |
edittask(string $seminaryUrl, string $questgroupUrl, string $questUrl)
Action: edittask.
Edit the task of a Quest of a Seminary.
string | $seminaryUrl | URL-Title of Seminary |
string | $questgroupUrl | URL-Title of Questgroup |
string | $questUrl | URL-Title of Quest |
edittexts(string $seminaryUrl, string $questgroupUrl, string $questUrl)
Action: edittexts.
Edit the texts of a Quest of a Seminary.
string | $seminaryUrl | URL-Title of Seminary |
string | $questgroupUrl | URL-Title of Questgroup |
string | $questUrl | URL-Title of Quest |
delete(string $seminaryUrl, string $questgroupUrl, string $questUrl)
Action: delete.
Delete a Quest of a Seminary.
string | $seminaryUrl | URL-Title of Seminary |
string | $questgroupUrl | URL-Title of Questgroup |
string | $questUrl | URL-Title of Quest |
__construct(string $layoutName, string $action, \nre\core\Agent $agent)
Construct a new Controller.
string | $layoutName | Name of the current Layout |
string | $action | Current Action |
\nre\core\Agent | $agent | Corresponding Agent |
checkAchievements(\nre\core\Request $request, \nre\core\Response $response, array $checkConditions = null)
Check for newly achieved Achievements.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
array | $checkConditions | Conditions to check |
getView() : \nre\core\View
Get the View of the Controller
View of the Controller
checkPermission(\nre\core\Request $request, \nre\core\Response $response)
Check user permissions.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
renderTask(string $questtypeClassname, array $seminary, array $questgroup, array $quest, array $character) : string
Render and handle the task of a Quest.
string | $questtypeClassname | Name of the class for the Questtype of a Quest |
array | $seminary | Seminary data |
array | $questgroup | Questgroup data |
array | $quest | Quest data |
array | $character | Character data |
Rendered output
renderTaskSubmission(string $questtypeClassname, array $seminary, array $questgroup, array $quest, array $character) : string
Render and handle a Character submission for a Quest.
string | $questtypeClassname | Name of the class for the Questtype of a Quest |
array | $seminary | Seminary data |
array | $questgroup | Questgroup data |
array | $quest | Quest data |
array | $character | Character data |
Rendered output
renderTaskEditing(string $questtypeClassname, array $seminary, array $questgroup, array $quest) : string
Render editing of a Quest.
string | $questtypeClassname | Name of the class for the Questtype of a Quest |
array | $seminary | Seminary data |
array | $questgroup | Questgroup data |
array | $quest | Quest data |
Rendered output
createQuesttypeResponse(string $action, $param1) : \nre\core\Response
Create a response for the Questtype rendering.
string | $action | Action to run |
$param1 |
Generated response
loadQuesttypeAgent(string $questtypeClassname, \nre\core\Request $request, \nre\core\Response $response) : \hhu\z\agents\QuesttypeAgent
Load and construct the QuesttypeAgent for a Questtype.
string | $questtypeClassname | Name of the class for the Questtype of a Quest |
\nre\core\Request | $request | Request |
\nre\core\Response | $response | Response |
Questtype Agent
runQuesttypeAgent(\nre\core\Agent $questtypeAgent, \nre\core\Request $request, \nre\core\Response $response) : string
Run and render the Agent for a QuesttypeAgent and return ist output.
\nre\core\Agent | $questtypeAgent | QuesttypeAgent to run and render |
\nre\core\Request | $request | Request |
\nre\core\Response | $response | Response |
Rendered output
sendSubmissionMail(array $seminary, array $questgroup, array $quest, array $character)
Send mail for new Character submission.
array | $seminary | Seminary which the Quest belongs to |
array | $questgroup | Questgroup of Quest |
array | $quest | Quest the answer has been submitted for |
array | $character | Character that send the submission |
sendSubmissionApprovedMail(array $character, array $seminary, array $questgroup, array $quest)
Send mail for approval of a Character submission.
array | $character | Character of submission that has been approved |
array | $seminary | Seminary which the Quest belongs to |
array | $questgroup | Questgroup of Quest |
array | $quest | Quest the submission has been approved for |