class PathComponent in Drupal 7 to 8/9 Module Upgrader 8
Same name in this branch
- 8 src/Utility/Path/Drupal7/PathComponent.php \Drupal\drupalmoduleupgrader\Utility\Path\Drupal7\PathComponent
- 8 src/Utility/Path/Drupal8/PathComponent.php \Drupal\drupalmoduleupgrader\Utility\Path\Drupal8\PathComponent
Represents a single component in a Drupal 7 route path.
Hierarchy
- class \Drupal\drupalmoduleupgrader\Utility\Path\PathComponentBase implements PathComponentInterface
- class \Drupal\drupalmoduleupgrader\Utility\Path\Drupal7\PathComponent
Expanded class hierarchy of PathComponent
4 files declare their use of PathComponent
- ParameterBinding.php in src/
Routing/ ParameterBinding.php - ParameterMap.php in src/
Routing/ ParameterMap.php - PathComponentTest.php in tests/
src/ Unit/ Utility/ Path/ Drupal7/ PathComponentTest.php - PathUtilityTest.php in tests/
src/ Unit/ Utility/ Path/ Drupal7/ PathUtilityTest.php
File
- src/
Utility/ Path/ Drupal7/ PathComponent.php, line 10
Namespace
Drupal\drupalmoduleupgrader\Utility\Path\Drupal7View source
class PathComponent extends PathComponentBase {
/**
* Returns if this component is a generic placeholder (%).
*
* @return bool
*/
public function isPlaceholder() {
return $this->value == '%';
}
/**
* {@inheritdoc}
*/
public function isWildcard() {
return (bool) preg_match('/%[a-zA-Z0-9_]+/', $this->value);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PathComponent:: |
public | function | Returns if this component is a generic placeholder (%). | |
PathComponent:: |
public | function |
Returns if this component is considered a wildcard. Overrides PathComponentInterface:: |
|
PathComponentBase:: |
protected | property | ||
PathComponentBase:: |
public | function |
Constructs the path component. Overrides PathComponentInterface:: |
|
PathComponentBase:: |
public | function |
Overrides PathComponentInterface:: |