October\Rain\Html\BlockBuilder

Overview

BlockBuilder is used for building placeholders and putting content to them


Protected Properties

protected array $blockStack

protected array $blocks


Public Methods

public append()

public append($name, $content): void

append a content of the layout block

public endBlock()

public endBlock($append = false): void

endBlock closes the layout block Append indicates that the new content should be appended to the existing block content

public endPut()

public endPut($append = false): void

endPut is a helper for endBlock and also clears the output buffer Append indicates that the new content should be appended to the existing block content

public get()

public get($name, $default = null): string|null 

get returns the layout block contents but not deletes the block from memory

public has()

public has($name): bool 

has a placeholder set up

public placeholder()

public placeholder($name, $default = null): string|null 

placeholder returns the layout block contents and deletes the block from memory.

public put()

public put($name): void

put is a helper for startBlock

public reset()

public reset(): void

reset clears all the registered blocks

public set()

public set($name, $content): void

set a content of the layout block.

public startBlock()

public startBlock($name): void

startBlock begins the layout block