protected function PanelsEverywhereBrowserTestBase::addPathCondition in Panels Everywhere 8.4
Adds a request_path condition to the variant with the given configuration.
Parameters
\Drupal\page_manager\Entity\PageVariant $variant: The variant entity.
string $paths: The list of paths separated by newline.
bool $negated: Whether to negate the path selection.
2 calls to PanelsEverywhereBrowserTestBase::addPathCondition()
- PanelsEverywhereTest::testCustomVariants in tests/
src/ Functional/ PanelsEverywhereTest.php - Verify that multiple variants work.
- PanelsEverywhereTest::testMixingRegularAndPanelsEverywherePages in tests/
src/ Functional/ PanelsEverywhereTest.php - Verify that using site_template for only part of the page breaks nothing.
File
- tests/
src/ Functional/ PanelsEverywhereBrowserTestBase.php, line 101
Class
- PanelsEverywhereBrowserTestBase
- This class simplifies the setup of functional tests.
Namespace
Drupal\Tests\panels_everywhere\FunctionalCode
protected function addPathCondition(PageVariant $variant, $paths, $negated = FALSE) {
$conditionInstance = $this->conditionManager
->createInstance('request_path', [
'pages' => $paths,
'negate' => $negated,
]);
$variant
->addSelectionCondition($conditionInstance
->getConfiguration());
}