trait HandleBlocks (View source)

Properties

static protected $hasRelatedTableCache

Methods

TwillModelContract|null
hydrateHandleBlocks(TwillModelContract $object, array $fields, int $fakeBlockId = 0, int|null $parentId = null, Collection|null $blocksFromFields = null, Collection|null $mainCollection = null)

No description

Collection
getChildrenBlocks($blocks, $blockRepository, $parentId, $fakeBlockId, $mainCollection)

No description

void
afterSaveHandleBlocks(Model $object, array $fields)

No description

array
getFormFieldsHandleBlocks(Model $object, array $fields)

No description

array
getBlockBrowsers(Block $block)

No description

void
bool
hasRelatedTable()

No description

Details

TwillModelContract|null hydrateHandleBlocks(TwillModelContract $object, array $fields, int $fakeBlockId = 0, int|null $parentId = null, Collection|null $blocksFromFields = null, Collection|null $mainCollection = null)

No description

Parameters

TwillModelContract $object
array $fields
int $fakeBlockId
int|null $parentId
Collection|null $blocksFromFields
Collection|null $mainCollection

Return Value

TwillModelContract|null

protected Collection getChildrenBlocks($blocks, $blockRepository, $parentId, $fakeBlockId, $mainCollection)

No description

Parameters

$blocks
$blockRepository
$parentId
$fakeBlockId
$mainCollection

Return Value

Collection

void afterSaveHandleBlocks(Model $object, array $fields)

No description

Parameters

Model $object
array $fields

Return Value

void

array getFormFieldsHandleBlocks(Model $object, array $fields)

No description

Parameters

Model $object
array $fields

Return Value

array

protected array getBlockBrowsers(Block $block)

No description

Parameters

Block $block

Return Value

array

void afterDuplicateHandleBlocks(TwillModelContract $object, TwillModelContract $newObject)

No description

Parameters

TwillModelContract $object
TwillModelContract $newObject

Return Value

void

protected bool hasRelatedTable()

No description

Return Value

bool