FieldLayoutFixture

Type
Abstract Class
Namespace
craft\test\fixtures
Inherits
craft\test\fixtures\FieldLayoutFixture » craft\test\Fixture
Since
3.2

Class FieldLayoutFixture.

View source

Public Methods

MethodDescription
afterUnload()Unloading fixtures removes fields and possible tables - so we need to refresh the DB Schema before our parent calls.
deleteAllByFieldHandle()Attempt to delete all fields and field layout by a field handle.
load()
unload()

afterUnload()

Unloading fixtures removes fields and possible tables - so we need to refresh the DB Schema before our parent calls. Craft::$app->getDb()->createCommand()->checkIntegrity(true);

View source

Throws

deleteAllByFieldHandle()

Attempt to delete all fields and field layout by a field handle.

  1. Get a field by handle
  2. Get its layout
  3. Traverse down the data (getTabs() and then on each tab getFields()
  4. Delete all fields.
  5. Delete the field layout.

View source

Arguments

Returns

boolean

Throws

load()

View source

Throws

unload()

View source

Returns

boolean

Throws

Protected Methods

extractTabsFromFieldLayout()

View source

Arguments

Returns

array

getTabsForFieldLayout()

View source

Arguments

Returns

array

linkFieldToLayout()

View source

Arguments

Returns

boolean

Throws

throwModelError()

View source

Arguments

Throws