implement CRUD for Charactertypes (resolves issue #319)

This commit is contained in:
coderkun 2014-05-30 10:46:53 +02:00
commit 9b05d99391
12 changed files with 493 additions and 30 deletions

View file

@ -222,7 +222,7 @@
throw new \nre\exceptions\AccessDeniedException();
}
catch(\nre\exceptions\IdNotFoundException $e) {
// The should be the case
// This should be the case
}
@ -308,6 +308,20 @@
// Get XP-levels
$xplevels = $this->Characters->getXPLevelsForSeminary($seminary['id']);
// Get Avatars
if(count($xplevels) > 0)
{
foreach($types as &$type)
{
try {
$type['avatar'] = $this->Avatars->getAvatarByTypeAndLevel($seminary['id'], $type['url'], $xplevels[0]['level']);
}
catch(\nre\exceptions\IdNotFoundException $e) {
// No Avatar available
}
}
}
// Set titile
$this->addTitleLocalized('Create Character');