# \hhu\z\controllersAchievementsController

Controller of the Agent to list Achievements.

## Summary

Methods
Properties
Constants
preFilter()
postFilter()
getTitle()
load()
factory()
run()
render()
index()
manage()
create()
moveup()
movedown()
edit()
conditions()
delete()
$components
$models
$seminary
$character
$user
$permissions
$seminaryPermissions
No constants found
__construct()
checkAchievements()
addTitle()
addTitleLocalized()
log()
set()
redirect()
checkModels()
getView()
loadModels()
loadView()
$log
$linker
$agent
$view
$viewData
$request
$response
N/A
checkPermission()
getClassName()
loadComponents()
$title
N/A

File
  controllers/AchievementsController.inc
Package
  Default
Class hierarchy
  \nre\core\Controller
  \hhu\z\Controller
  \hhu\z\controllers\IntermediateController
  \hhu\z\controllers\SeminaryController
  \hhu\z\controllers\AchievementsController

## Tags

author | Oliver Hanraths oliver.hanraths@uni-duesseldorf.de

## Properties

### $components

    $components : array

Required components

#### Type

array

#

## Tags

None found

### $models

    $models : array

Required models

#### Type

array

#

## Tags

None found

### $seminary

    $seminary :

Current Seminary

var array

#### Type

#

Inherited from
  \hhu\z\controllers\SeminaryController

## Tags

None found

### $character

    $character : array

Character of current user and Seminary

#### Type

array

#

Inherited from
  \hhu\z\controllers\SeminaryController

## Tags

None found

### $user

    $user : array

Current user

#### Type

array

#

Inherited from
  \hhu\z\controllers\IntermediateController

## Tags

None found

### $permissions

    $permissions : array

User permissions

#### Type

array

#

## Tags

None found

### $seminaryPermissions

    $seminaryPermissions : array

User seminary permissions

#### Type

array

#

## Tags

None found

### $log

    $log : \nre\core\Logger

Logger instance

#### Type

\nre\core\Logger

#

Inherited from
  \hhu\z\Controller

## Tags

None found

### $linker

    $linker : \nre\core\Linker

Linker instance

#### Type

\nre\core\Linker

#

Inherited from
  \hhu\z\Controller

## Tags

None found

### $agent

    $agent : \nre\core\Agent

Corresponding Agent

#### Type

\nre\core\Agent

#

Inherited from
  \nre\core\Controller

## Tags

None found

### $view

    $view : \nre\core\View

View of the Controller

#### Type

\nre\core\View

#

Inherited from
  \nre\core\Controller

## Tags

None found

### $viewData

    $viewData : array

Data to pass to the View

#### Type

array

#

Inherited from
  \nre\core\Controller

## Tags

None found

### $request

    $request : \nre\core\Request

Current request

#### Type

\nre\core\Request

#

Inherited from
  \nre\core\Controller

## Tags

None found

### $response

    $response : \nre\core\Response

Current response

#### Type

\nre\core\Response

#

Inherited from
  \nre\core\Controller

## Tags

None found

### $title

    $title : array

Title information

#### Type

array

#

Inherited from
  \hhu\z\controllers\IntermediateController

## Tags

None found

## Methods

### preFilter()

    preFilter(\nre\core\Request  $request, \nre\core\Response  $response)

Prefilter that is executed before running the Controller.

#### Parameters

\nre\core\Request | $request | Current request
\nre\core\Response | $response | Current response

#

Inherited from
  \nre\core\Controller

## Tags

None found

### postFilter()

    postFilter(\nre\core\Request  $request, \nre\core\Response  $response)

Prefilter that is executed after running the Controller.

#### Parameters

\nre\core\Request | $request | Current request
\nre\core\Response | $response | Current response

#

Inherited from
  \nre\core\Controller

## Tags

None found

### getTitle()

    getTitle() : string

Return current title information.

#### Returns

string —

Title information

#

Inherited from
  \hhu\z\controllers\IntermediateController

## Tags

None found

### load()

    load(string  $controllerName)

Load the class of a Controller.

#### Parameters

string | $controllerName | Name of the Controller to load

#### Throws

\nre\exceptions\ControllerNotFoundException
\nre\exceptions\ControllerNotValidException

#

static

Inherited from
  \nre\core\Controller

## Tags

None found

### factory()

    factory(string  $controllerName, string  $layoutName, string  $action, string  $agent)

Instantiate a Controller (Factory Pattern).

#### Parameters

string | $controllerName | Name of the Controller to instantiate
string | $layoutName | Name of the current Layout
string | $action | Current Action
string | $agent | Corresponding Agent

#### Throws

\nre\exceptions\DatamodelException
\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException
\nre\exceptions\ModelNotValidException
\nre\exceptions\ModelNotFoundException
\nre\exceptions\ViewNotFoundException

#

static

Inherited from
  \nre\core\Controller

## Tags

None found

### run()

    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.

#### Parameters

\nre\core\Request | $request | Current request
\nre\core\Response | $response | Current response

#### Throws

\nre\exceptions\ParamsNotValidException
\nre\exceptions\IdNotFoundException
\nre\exceptions\DatamodelException
\nre\exceptions\ActionNotFoundException

#

Inherited from
  \nre\core\Controller

## Tags

None found

### render()

    render(array  $viewData = null) : string

Generate the output.

#### Parameters

array | $viewData | Data to pass to the View

#### Returns

string —

Generated output

#

Inherited from
  \nre\core\Controller

## Tags

None found

### index()

    index(string  $seminaryUrl)

Action: index.

List Achievements of a Seminary.

#### Parameters

string | $seminaryUrl | URL-Title of Seminary

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### manage()

    manage(string  $seminaryUrl)

Action: manage.

Manage Achievements of a Seminary.

#### Parameters

string | $seminaryUrl | URL-Title of Seminary

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### create()

    create(string  $seminaryUrl)

Action: create.

Create a new Achievement.

#### Parameters

string | $seminaryUrl | URL-title of Seminary

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### moveup()

    moveup(string  $seminaryUrl, string  $achievementUrl)

Action: moveup.

Move an Achievement up (decrement position).

#### Parameters

string | $seminaryUrl | URL-title of Seminary
string | $achievementUrl | URL-title of Achievement

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### movedown()

    movedown(string  $seminaryUrl, string  $achievementUrl)

Action: movedown.

Move an Achievement down (increment position).

#### Parameters

string | $seminaryUrl | URL-title of Seminary
string | $achievementUrl | URL-title of Achievement

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### edit()

    edit(string  $seminaryUrl, string  $achievementUrl)

Action: edit.

Edit an Achievement.

#### Parameters

string | $seminaryUrl | URL-title of Seminary
string | $achievementUrl | URL-title of Achievement to edit

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### conditions()

    conditions(string  $seminaryUrl, string  $achievementUrl)

Action: conditions.

Edit conditions of an Achievement.

#### Parameters

string | $seminaryUrl | URL-title of Seminary
string | $achievementUrl | URL-title of Achievement to edit

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### delete()

    delete(string  $seminaryUrl, string  $achievementUrl)

Action: delete.

Delete an Achievement.

#### Parameters

string | $seminaryUrl | URL-title of Seminary
string | $achievementUrl | URL-title of Achievement

#### Throws

\nre\exceptions\IdNotFoundException

#

## Tags

None found

### __construct()

    __construct(string  $layoutName, string  $action, \nre\core\Agent  $agent)

Construct a new Controller.

#### Parameters

string | $layoutName | Name of the current Layout
string | $action | Current Action
\nre\core\Agent | $agent | Corresponding Agent

#### Throws

\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException
\nre\exceptions\ModelNotValidException
\nre\exceptions\ModelNotFoundException
\nre\exceptions\ViewNotFoundException

#

Inherited from
  \nre\core\Controller

## Tags

None found

### checkAchievements()

    checkAchievements(\nre\core\Request  $request, \nre\core\Response  $response, array  $checkConditions = null)

Check for newly achieved Achievements.

#### Parameters

\nre\core\Request | $request | Current request
\nre\core\Response | $response | Current response
array | $checkConditions | Conditions to check

#

Inherited from
  \hhu\z\controllers\SeminaryController

## Tags

None found

### addTitle()

    addTitle(string  $title)

Add a piece of information to the current title.

#### Parameters

string | $title | Title information

#

Inherited from
  \hhu\z\controllers\IntermediateController

## Tags

None found

### addTitleLocalized()

    addTitleLocalized(string  $title)

Add a piece of information to the current title and localize it.

#### Parameters

string | $title | Title information

#

Inherited from
  \hhu\z\controllers\IntermediateController

## Tags

None found

### log()

    log(string  $message, integer  $logMode = \nre\core\Logger::LOGMODE_AUTO)

Log an error.

#### Parameters

string | $message | Error message to log
integer | $logMode | Log mode (optional)

#

Inherited from
  \hhu\z\Controller

## Tags

None found

### set()

    set(string  $name, mixed  $data)

Set data for the View.

#### Parameters

string | $name | Key
mixed | $data | Value

#

Inherited from
  \nre\core\Controller

## Tags

None found

### redirect()

    redirect(string  $url)

Redirect to the given URL.

#### Parameters

string | $url | Relative URL

#

Inherited from
  \nre\core\Controller

## Tags

None found

### checkModels()

    checkModels(string  $modelName) : boolean

Check if Models of this Controller are loaded and available.

#### Parameters

string | $modelName | Arbitrary number of Models to check

#### Returns

boolean —

All given Models are loaded and available

#

Inherited from
  \nre\core\Controller

## Tags

None found

### getView()

    getView() : \nre\core\View

Get the View of the Controller

#### Returns

\nre\core\View —

View of the Controller

#

Inherited from
  \nre\core\Controller

## Tags

None found

### loadModels()

    loadModels()

Load the Models of this Controller.

#### Throws

\nre\exceptions\DatamodelException
\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException
\nre\exceptions\ModelNotValidException
\nre\exceptions\ModelNotFoundException

#

Inherited from
  \nre\core\Controller

## Tags

None found

### loadView()

    loadView(string  $layoutName, string  $action)

Load the View of this Controller.

#### Parameters

string | $layoutName | Name of the current Layout
string | $action | Current Action

#### Throws

\nre\exceptions\ViewNotFoundException

#

Inherited from
  \nre\core\Controller

## Tags

None found

### checkPermission()

    checkPermission(\nre\core\Request  $request, \nre\core\Response  $response)

Check user permissions.

#### Parameters

\nre\core\Request | $request | Current request
\nre\core\Response | $response | Current response

#### Throws

\nre\exceptions\AccessDeniedException

#

Inherited from
  \hhu\z\controllers\IntermediateController

## Tags

None found

### getClassName()

    getClassName(string  $controllerName) : string

Determine the classname for the given Controller name.

#### Parameters

string | $controllerName | Controller name to get classname of

#### Returns

string —

Classname for the Controller name

#

static

Inherited from
  \nre\core\Controller

## Tags

None found

### loadComponents()

    loadComponents()

Load the Components of this Controller.

#### Throws

\nre\exceptions\ComponentNotValidException
\nre\exceptions\ComponentNotFoundException

#

Inherited from
  \nre\core\Controller

## Tags

None found

### AchievementsController.inc