You are here

protected function ParagraphsFeaturesSingleActionTest::setParagraphFeature in Paragraphs Features 8

Same name and namespace in other branches
  1. 2.x tests/src/FunctionalJavascript/ParagraphsFeaturesSingleActionTest.php \Drupal\Tests\paragraphs_features\FunctionalJavascript\ParagraphsFeaturesSingleActionTest::setParagraphFeature()

Helper method to set paragraphs widget feature configuration options.

Parameters

string $content_type: The content type containing a paragraphs field.

string $feature: Feature name.

string $value: Feature value. Usually same as the feature name to enable it or "0" to disable it.

4 calls to ParagraphsFeaturesSingleActionTest::setParagraphFeature()
ParagraphsFeaturesSingleActionTest::disableDuplicateAction in tests/src/FunctionalJavascript/ParagraphsFeaturesSingleActionTest.php
Disables the duplicate action.
ParagraphsFeaturesSingleActionTest::enableDuplicateAction in tests/src/FunctionalJavascript/ParagraphsFeaturesSingleActionTest.php
Enables the duplicate action.
ParagraphsFeaturesSingleActionTest::setupParagraphSettings in tests/src/FunctionalJavascript/ParagraphsFeaturesSingleActionTest.php
Setup paragraphs field for a content type.
ParagraphsFeaturesSingleActionTest::testAddAboveSupport in tests/src/FunctionalJavascript/ParagraphsFeaturesSingleActionTest.php
Test "add above" feature in combination with single action to button.

File

tests/src/FunctionalJavascript/ParagraphsFeaturesSingleActionTest.php, line 98

Class

ParagraphsFeaturesSingleActionTest
Test display of single actions according to the dropdown_to_button setting.

Namespace

Drupal\Tests\paragraphs_features\FunctionalJavascript

Code

protected function setParagraphFeature($content_type, $feature, $value) {
  $this
    ->config('core.entity_form_display.node.' . $content_type . '.default')
    ->set('content.field_paragraphs.settings.features.' . $feature, $value)
    ->save();
}