DemoStoryHook
extends StoryHook
in package
Story hook demo class
Table of Contents
Properties
- $perso : Perso
- The character involved in the story
- $section : mixed
- $story : Story
- The current story
Methods
- __construct() : mixed
- Constructor
- add_content() : string
- Adds HTML code *AT THE END* of the story content block
- add_html() : mixed
- Adds content after our story content block
- get_choices_links() : mixed
- Updates the current section choices
- initialize() : mixed
- Initializes resources
- update_description() : mixed
- Updates the current section description.
Properties
$perso
The character involved in the story
public
Perso
$perso
$section
public
mixed
$section
$story
The current story
public
Story
$story
Methods
__construct()
Constructor
public
__construct(Story $story, StorySection $section) : mixed
Parameters
- $story : Story
-
The story including this hook
- $section : StorySection
-
The section including this hook
add_content()
Adds HTML code *AT THE END* of the story content block
public
add_content() : string
Return values
stringadd_html()
Adds content after our story content block
public
add_html() : mixed
Tags
get_choices_links()
Updates the current section choices
public
get_choices_links(array<string|int, mixed> &$links) : mixed
Parameters
- $links : array<string|int, mixed>
-
the section links
Tags
initialize()
Initializes resources
public
initialize() : mixed
Tags
update_description()
Updates the current section description.
public
update_description(string &$description) : mixed
Parameters
- $description : string
-
the description to update