\WebinoDraw\InstructionsInstructions

Draw instructions utilities

Summary

Methods
Properties
Constants
__construct()
exchangeArray()
getSortedArrayCopy()
merge()
No public properties found
STACK_SPACER
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

STACK_SPACER

STACK_SPACER

Stack space before instruction without index

Methods

__construct()

__construct(array  $array = array()) 

Parameters

array $array

exchangeArray()

exchangeArray(array  $array) 

Parameters

array $array

getSortedArrayCopy()

getSortedArrayCopy() : array

Sort by stackIndex

Returns

array

merge()

merge(array  $instructions) : self

Merge draw instructions

If node with name exists merge else add, or if same stackIndex throws exception.

Instructions structure:

[
  'node_name' => [
    'stackIndex' => '50',
    'customkey'  => 'customvalue',
    ....
  ],
];

If no stackIndex is defined add as last with space before.

Parameters

array $instructions

Merge from

Throws

\WebinoDraw\Exception\InvalidInstructionException

Returns

self