class Blocks (View source)

The Blocks class.

Methods

static string
injectAssets(string $str)

Inject block assets into the header of a page.

static string
render(string $json, Automad $Automad)

Render blocks created by the EditorJS block editor.

static object
prepareData(object $data)

Prepare block data

Details

static string injectAssets(string $str)

Inject block assets into the header of a page.

Parameters

string $str

Return Value

string the processed HTML

static string render(string $json, Automad $Automad)

Render blocks created by the EditorJS block editor.

Parameters

string $json
Automad $Automad

Return Value

string the rendered HTML

static private object prepareData(object $data)

Prepare block data

Parameters

object $data

Return Value

object $data