Devise
Class

Devise\Pages\Interrupter\Block

class Block

Class Block is a container class that represents the tree hierarchy of html from inside of the blade view.

This could be if/foreach blocks nested inside of other if/foreach blocks. We do this so we can find the position of devise tags that are not always rendered to the page because they are nested under some block.

Properties

string $type The type of block could be if or foreach
array $includedViews Keeps track of views that we've included this prevents us from re-opening other views so we don't have recursive loops going on

Methods

__construct()

Construct a new block

start(Node $node)

Sets the starting node for this block

stop(Node $node)

Sets the stopping node for this block.

addTag(Node $node)

Add a devise tag to this block

addBlock(Block $block)

Add another nested block to this block

integer getStartingPosition()

Gets the starting position of this block

Node getStartBlock()

Gets the starting node for block

Node getStopBlock()

Gets the stopping node for this block

array getBlocks()

All the children blocks of this block

array getTags(array $includeTypes = array('block'))

Get all tags for all children blocks that have been nested.

Details

at line 65
public __construct()

Construct a new block

at line 77
public start(Node $node)

Sets the starting node for this block

Parameters

Node $node

at line 91
public stop(Node $node)

Sets the stopping node for this block.

Some block types don't have stopping nodes like the

Parameters

Node $node

at line 101
public addTag(Node $node)

Add a devise tag to this block

Parameters

Node $node

at line 111
public addBlock(Block $block)

Add another nested block to this block

Parameters

Block $block

at line 121
public integer getStartingPosition()

Gets the starting position of this block

Return Value

integer

at line 131
public Node getStartBlock()

Gets the starting node for block

Return Value

Node

at line 141
public Node getStopBlock()

Gets the stopping node for this block

Return Value

Node

at line 152
public array getBlocks()

All the children blocks of this block

Return Value

array

at line 166
public array getTags(array $includeTypes = array('block'))

Get all tags for all children blocks that have been nested.

This is a helper method that traverses through all tags in this block and all it's nested block tags too

Parameters

array $includeTypes

Return Value

array