add namespaces to docstring types
This commit is contained in:
parent
2c0e68b194
commit
eca33f7a73
98 changed files with 632 additions and 555 deletions
|
|
@ -93,7 +93,7 @@
|
|||
* @param array $questgroup Current Questgroup data
|
||||
* @param array $quest Current Quest data
|
||||
* @param array $character Current Character data
|
||||
* @param Exception $exception Character submission exception
|
||||
* @param \Exception $exception Character submission exception
|
||||
*/
|
||||
public function quest($seminary, $questgroup, $quest, $character, $exception)
|
||||
{
|
||||
|
|
@ -227,6 +227,23 @@
|
|||
*/
|
||||
public function edittask($seminary, $questgroup, $quest)
|
||||
{
|
||||
$fight = $this->Bossfight->getBossFight($quest['id']);
|
||||
/*
|
||||
if(!is_null($fight['boss_seminarymedia_id'])) {
|
||||
$fight['bossmedia'] = $this->Media->getSeminaryMediaById($fight['boss_seminarymedia_id']);
|
||||
}
|
||||
*/
|
||||
|
||||
// Get stages
|
||||
$stage = $this->Bossfight->getFirstStage($quest['id']);
|
||||
$stage['childs'] = $this->getChildStages($stage['id']);
|
||||
|
||||
|
||||
// Pass data to view
|
||||
$this->set('seminary', $seminary);
|
||||
$this->set('fight', $fight);
|
||||
$this->set('stages', $stage);
|
||||
//print_r($stage);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -249,6 +266,26 @@
|
|||
$_SESSION['quests'][$questId]['stages'] = array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all child-stages of a parent-stage.
|
||||
*
|
||||
* @param int $stageId ID of parent-stage
|
||||
* @return array List of child-stages
|
||||
*/
|
||||
private function getChildStages($stageId)
|
||||
{
|
||||
$childStages = $this->Bossfight->getChildStages($stageId);
|
||||
if(!empty($childStages)) {
|
||||
foreach($childStages as &$stage) {
|
||||
$stage['childs'] = $this->getChildStages($stage['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $childStages;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue