search for the first text of a Questgroup recursively (Issue #77)
This commit is contained in:
parent
22ae4c46d7
commit
0294040063
3 changed files with 53 additions and 16 deletions
|
|
@ -34,6 +34,24 @@
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Get the first text of a Quest.
|
||||
*
|
||||
* @param int $questId ID of a Quest
|
||||
* @return string First text of this Quest or NULL
|
||||
*/
|
||||
public function getFirstQuestText($questId)
|
||||
{
|
||||
$prolog = $this->getQuesttextsOfQuest($questId, 'Prolog');
|
||||
if(!empty($prolog)) {
|
||||
return $prolog[0]['text'];
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all Questtexts for a Quest.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue