$components
$components : array
Required components
Controller of the MediaAgent to process and show Media.
$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.
\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 |
seminarymoodpic(string $seminaryUrl, string $category = null, string $action = null)
Action: seminarymoodpic
Display the moodpic for a category of a Seminary.
string | $seminaryUrl | URL-title of the Seminary |
string | $category | Category to show moodpic of |
string | $action | Action for processing the media |
seminary(string $seminaryUrl, string $mediaUrl, string $action = null)
Action: seminary.
Display a Seminary medium.
string | $seminaryUrl | URL-title of the Seminary |
string | $mediaUrl | URL-name of the medium |
string | $action | Action for processing the media |
avatar(string $seminaryUrl, string $charactertypeUrl, integer $xplevel, string $action = 'avatar')
Action: avatar.
Display an Avatar as full size or portrait.
string | $seminaryUrl | URL-title of the Seminary |
string | $charactertypeUrl | URL-title of Character type |
integer | $xplevel | XP-level |
string | $action | Size to show (avatar or portrait) |
achievement(string $seminaryUrl, string $achievementUrl, $locked = null)
Action: achievement
Display the achievement of a Seminary.
string | $seminaryUrl | URL-title of the Seminary |
string | $achievementUrl | URL-title of the Achievement |
$locked |
charactergroup(string $seminaryUrl, string $groupsgroupUrl, string $groupUrl)
Action: charactergroup
Display the icon for a Character group of a Seminary.
string | $seminaryUrl | URL-Title of a Seminary |
string | $groupsgroupUrl | URL-Title of a Character groups-group |
string | $groupUrl | URL-Title of a Character group |
charactergroupsquest(string $seminaryUrl, string $groupsgroupUrl, string $questUrl)
Action: charactergroupsquest
Display the icon for a Character groups Quest of a Seminary.
string | $seminaryUrl | URL-Title of a Seminary |
string | $groupsgroupUrl | URL-Title of a Character groups-group |
string | $questUrl | URL-Title of a Character groups 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 |
getMediaFile(array $media, string $action = null) : object
Determine the file for a medium and process it if necessary.
array | $media | Medium to get file for |
string | $action | Action for processing the media |
File for the medium (or null if medium is cached)
resizeImage(string $fileName, string $mimeType, integer $width, integer $height) : mixed
Resize an image.
string | $fileName | Absolute pathname of image to resize |
string | $mimeType | Mimetype of target image |
integer | $width | Max. width to resize to |
integer | $height | Max. height to resize to |
Resized image