function InlineBlockTestBase::createBlockContentType
Same name in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::createBlockContentType()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::createBlockContentType()
- 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::createBlockContentType()
Creates a block content type.
Parameters
string $id: The block type id.
string $label: The block type label.
2 calls to InlineBlockTestBase::createBlockContentType()
- InlineBlockTest::testAddWorkFlow in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Tests the workflow for adding an inline block depending on number of types.
- InlineBlockTestBase::setUp in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php
File
-
core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php, line 221
Class
- InlineBlockTestBase
- Base class for testing inline blocks.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function createBlockContentType($id, $label) {
$bundle = BlockContentType::create([
'id' => $id,
'label' => $label,
'revision' => 1,
]);
$bundle->save();
block_content_add_body_field($bundle->id());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.