public static function FormModesSubscriber::isEditRoute in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/Routing/EventSubscriber/FormModesSubscriber.php \Drupal\form_mode_manager\Routing\EventSubscriber\FormModesSubscriber::isEditRoute()
Evaluate if current context is edit.
Parameters
\Symfony\Component\Routing\Route $route: The route object of entity.
Return value
bool True if current route context is edit or False if not.
1 call to FormModesSubscriber::isEditRoute()
- FormModesSubscriber::getFormModeRouteDefaults in src/
Routing/ EventSubscriber/ FormModesSubscriber.php - Get defaults parameters nedeed to build Form Mode Manager routes.
File
- src/
Routing/ EventSubscriber/ FormModesSubscriber.php, line 285
Class
- FormModesSubscriber
- Subscriber for form_mode_manager routes.
Namespace
Drupal\form_mode_manager\Routing\EventSubscriberCode
public static function isEditRoute(Route $route) {
return (bool) preg_match_all(self::ROUTE_PATH_CONTEXT_REGEX, $route
->getPath(), $matches, PREG_SET_ORDER, 0);
}