You are here

public function HttpStatusCodeDisplayVariant::getParameterNames in Page Manager 8.4

Gets the names of all parameters for this path.

Parameters

string $path: The path to return the parameter names for.

Return value

string[] An array of parameter names for the given path.

1 call to HttpStatusCodeDisplayVariant::getParameterNames()
HttpStatusCodeDisplayVariant::build in src/Plugin/DisplayVariant/HttpStatusCodeDisplayVariant.php
Builds and returns the renderable array for the display variant.

File

src/Plugin/DisplayVariant/HttpStatusCodeDisplayVariant.php, line 214

Class

HttpStatusCodeDisplayVariant
Provides a variant that returns a response with an HTTP status code.

Namespace

Drupal\page_manager\Plugin\DisplayVariant

Code

public function getParameterNames($path) {
  if (preg_match_all('|\\{(\\w+)\\}|', $path, $matches)) {
    return $matches[1];
  }
  return [];
}