function LayoutBuilderAccessTest::providerTestAccessWithBundles
Same name in other branches
- 8.9.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderAccessTest::providerTestAccessWithBundles()
- 10 core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderAccessTest::providerTestAccessWithBundles()
- 11.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderAccessTest::providerTestAccessWithBundles()
Provides test data for ::testAccessWithBundles().
File
-
core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderAccessTest.php, line 144
Class
- LayoutBuilderAccessTest
- Tests access to Layout Builder.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
public function providerTestAccessWithBundles() {
// Data provider values are:
// - the permissions to grant to the user
// - whether access is expected for the defaults
// - whether access is expected for a non-editable override
// - whether access is expected for an editable override.
$data = [];
$data['configure any layout'] = [
[
'configure any layout',
'administer node display',
],
TRUE,
TRUE,
TRUE,
[],
];
$data['override permissions'] = [
[
'configure all bundle_with_section_field node layout overrides',
],
FALSE,
TRUE,
TRUE,
[
'configure all bundle_with_section_field node layout overrides' => [
'config' => [
'core.entity_view_display.node.bundle_with_section_field.default',
],
],
],
];
$data['editable override permissions'] = [
[
'configure editable bundle_with_section_field node layout overrides',
],
FALSE,
FALSE,
TRUE,
[
'configure editable bundle_with_section_field node layout overrides' => [
'config' => [
'core.entity_view_display.node.bundle_with_section_field.default',
],
],
],
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.