class Step

This class allows the storage and retrieval of the attributes of a simulation step.

Properties

private Simulator $simulator
private int $id
private string $name
private string $label
private string $template
private string $output
private RichText|null $description
private bool $dynamic
private bool $pdfFooter
private array $panels
private array $actions
private Footnotes $footnotes
private bool $displayable

Methods

void
__construct(Simulator $simulator, int $id, string $name, string $label, string $template)

Constructor of class Step

getSimulator()

Returns the Simulator object to which this step belongs

int
getId()

Returns the ID of this step

void
setId(int $id)

Sets the ID of this step

string
getName()

Returns the name of this step

void
setName(string $name)

Sets the name of this step

string
getTemplate()

Returns the name of the twig template that is used to display the simulation form for this step

void
setTemplate(string $template)

Sets the name of the twig template that is used to display the simulation form for this step

string
getOutput()

Returns the output of the result of the execution of the step

void
setOutput(string $output)

Sets the output of the result of the execution of the step

string
getLabel()

Returns the label of this step

void
setLabel(string $label)

Sets the label of this step

RichText|null
getDescription()

Returns the description of this step

void
setDescription(RichText $description)

Sets the description of this step

bool
isDynamic()

Returns the dynamic attribute of this Step object

bool
getDynamic()

Returns the dynamic attribute of this Step object

void
setDynamic(bool $dynamic)

Determines whether this step is dynamic or not

bool
hasPdfFooter()

Returns the pdfFooter attribute of this Step object

bool
getPdfFooter()

Returns the pdfFooter attribute of this Step object

void
setPdfFooter(bool $pdfFooter)

Determine whether or not a footer will be added to PDF output

array
getPanels()

Returns the list of panels of this step.

void
setPanels(array $panels)

Sets the list of panels of this step.

void
addPanel(Panel $panel)

Adds a Panel object to the list of panels of this step.

void
removePanel(int $index)

Removes a Panel object from the list of panels of this step.

Panel|null
getPanelById(int $id)

Retrieves an Panel object by its ID in the list of panels of this step

array
getActions()

Returns the list of action buttons of this step.

array
getActionsOfShapeAt($shape, $location)

Returns the list of action buttons of this step, placed at location given as parameter.

void
setActions(array $actions)

Sets the list of action buttons of this step.

void
addAction(Action $action)

Adds an Action object to the list of action buttons of this step.

void
removeAction(int $index)

Removes an Action object from the list of action buttons of this step.

Action|null
getActionByName(string $name)

Retrieves an Action object by its name in the list of action buttons of this step

Footnotes
getFootNotes()

Returns the footnotes container of this step

void
setFootNotes(FootNotes $footnotes)

Sets the footnotes container of this step

bool
isDisplayable()

Returns the displayable attribute of this Step object

bool
getDisplayable()

Returns the displayable attribute of this Step object

void
setDisplayable(bool $displayable)

Determines whether this step can be displayed or not

bool
hasInputFields()

Does this step contain at least one input field?

bool
hasRequiredFields()

Does this step contain at least one required input field?

Details

at line 153
void __construct(Simulator $simulator, int $id, string $name, string $label, string $template)

Constructor of class Step

Parameters

Simulator $simulator The Simulator object to which this step belongs
int $id The ID of this step
string $name The name of this step
string $label The label of this step
string $template The twig template that is used to display the simulation form for this step

Return Value

void

at line 168
Simulator getSimulator()

Returns the Simulator object to which this step belongs

Return Value

Simulator The Simulator object

at line 179
int getId()

Returns the ID of this step

Return Value

int The ID of this step

at line 191
void setId(int $id)

Sets the ID of this step

Parameters

int $id The ID of this step

Return Value

void

at line 202
string getName()

Returns the name of this step

Return Value

string the The name of this step

at line 214
void setName(string $name)

Sets the name of this step

Parameters

string $name The name of this step

Return Value

void

at line 225
string getTemplate()

Returns the name of the twig template that is used to display the simulation form for this step

Return Value

string The name of the twig template.

at line 237
void setTemplate(string $template)

Sets the name of the twig template that is used to display the simulation form for this step

Parameters

string $template The name of the twig template.

Return Value

void

at line 257
string getOutput()

Returns the output of the result of the execution of the step

The possible values are:

  • normal: the step is displayed normally.
  • inlinePDF: G6K displays a PDF rendering of the generated page.
  • downloadablePDF: G6K generates a PDF file of the rendering of the page to be downloaded.
  • inlineFilledPDF: G6K fills a PDF Form with data.
  • downloadableFilledPDF: G6K fills a PDF Form to be downloaded with data.
  • html: Not implemented

Return Value

string The output of the result

at line 278
void setOutput(string $output)

Sets the output of the result of the execution of the step

The possible values are:

  • normal: the step is displayed normally.
  • inlinePDF: G6K displays a PDF rendering of the generated page.
  • downloadablePDF: G6K generates a PDF file of the rendering of the page to be downloaded.
  • inlineFilledPDF: G6K fills a PDF Form with data.
  • downloadableFilledPDF: G6K fills a PDF Form to be downloaded with data.
  • html: Not implemented

Parameters

string $output The output of the result

Return Value

void

at line 289
string getLabel()

Returns the label of this step

Return Value

string The label of this step

at line 301
void setLabel(string $label)

Sets the label of this step

Parameters

string $label The label of this step

Return Value

void

at line 312
RichText|null getDescription()

Returns the description of this step

Return Value

RichText|null the The description of this step

at line 324
void setDescription(RichText $description)

Sets the description of this step

Parameters

RichText $description The description of this step

Return Value

void

at line 337
bool isDynamic()

Returns the dynamic attribute of this Step object

if true, the simulation engine will use Javascript to give interactivity to the simulation for this step

Return Value

bool true if this step is dynamic, false otherwise

at line 350
bool getDynamic()

Returns the dynamic attribute of this Step object

if true, the simulation engine will use Javascript to give interactivity to the simulation for this step

Return Value

bool true if this step is dynamic, false otherwise

at line 364
void setDynamic(bool $dynamic)

Determines whether this step is dynamic or not

if true, the simulation engine will use Javascript to give interactivity to the simulation for this step

Parameters

bool $dynamic true if this step is dynamic, false otherwise

Return Value

void

at line 377
bool hasPdfFooter()

Returns the pdfFooter attribute of this Step object

if true, a footer will be added to the PDF outputs

Return Value

bool true if a footer will be added, false otherwise

at line 390
bool getPdfFooter()

Returns the pdfFooter attribute of this Step object

if true, a footer will be added to the PDF outputs

Return Value

bool true if a footer will be added, false otherwise

at line 404
void setPdfFooter(bool $pdfFooter)

Determine whether or not a footer will be added to PDF output

if true, a footer will be added to the PDF outputs

Parameters

bool $pdfFooter true if a footer will be added, false otherwise

Return Value

void

at line 415
array getPanels()

Returns the list of panels of this step.

Return Value

array The list of panels

at line 427
void setPanels(array $panels)

Sets the list of panels of this step.

Parameters

array $panels The list of panels

Return Value

void

at line 439
void addPanel(Panel $panel)

Adds a Panel object to the list of panels of this step.

Parameters

Panel $panel The Panel object

Return Value

void

at line 451
void removePanel(int $index)

Removes a Panel object from the list of panels of this step.

Parameters

int $index The index of the Panel object in the list of panels

Return Value

void

at line 463
Panel|null getPanelById(int $id)

Retrieves an Panel object by its ID in the list of panels of this step

Parameters

int $id The ID of the panel

Return Value

Panel|null The Panel object

at line 479
array getActions()

Returns the list of action buttons of this step.

Return Value

array The list of action buttons

at line 490
array getActionsOfShapeAt($shape, $location)

Returns the list of action buttons of this step, placed at location given as parameter.

Parameters

$shape
$location

Return Value

array The list of action buttons

at line 504
void setActions(array $actions)

Sets the list of action buttons of this step.

Parameters

array $actions The list of action buttons

Return Value

void

at line 516
void addAction(Action $action)

Adds an Action object to the list of action buttons of this step.

Parameters

Action $action The Action object

Return Value

void

at line 528
void removeAction(int $index)

Removes an Action object from the list of action buttons of this step.

Parameters

int $index The index of the Action object in the list of action buttons

Return Value

void

at line 540
Action|null getActionByName(string $name)

Retrieves an Action object by its name in the list of action buttons of this step

Parameters

string $name The name of the action button

Return Value

Action|null The Action object

at line 556
Footnotes getFootNotes()

Returns the footnotes container of this step

Return Value

Footnotes The footnotes container

at line 568
void setFootNotes(FootNotes $footnotes)

Sets the footnotes container of this step

Parameters

FootNotes $footnotes The footnotes container

Return Value

void

at line 579
bool isDisplayable()

Returns the displayable attribute of this Step object

Return Value

bool true if this step can be displayed, false otherwise

at line 590
bool getDisplayable()

Returns the displayable attribute of this Step object

Return Value

bool true if this step can be displayed, false otherwise

at line 602
void setDisplayable(bool $displayable)

Determines whether this step can be displayed or not

Parameters

bool $displayable true if this step can be displayed, false otherwise

Return Value

void

at line 613
bool hasInputFields()

Does this step contain at least one input field?

Return Value

bool true if this step contains at least one field entered by the user, false otherwise

at line 629
bool hasRequiredFields()

Does this step contain at least one required input field?

Return Value

bool true if this step contains at least one required field entered by the user, false otherwise