private function NodeEntityBundleController::getContentType in Permissions by Term 8
Same name and namespace in other branches
- 8.2 src/Controller/NodeEntityBundleController.php \Drupal\permissions_by_term\Controller\NodeEntityBundleController::getContentType()
1 call to NodeEntityBundleController::getContentType()
- NodeEntityBundleController::getFormInfoByUrl in src/
Controller/ NodeEntityBundleController.php
File
- src/
Controller/ NodeEntityBundleController.php, line 93
Class
- NodeEntityBundleController
- Class NodeEntityBundleController
Namespace
Drupal\permissions_by_term\ControllerCode
private function getContentType($nodeEditPath) {
preg_match_all('!\\d+!', $nodeEditPath, $matches);
$nid = $matches[0][0];
$node = \Drupal::entityTypeManager()
->getStorage('node')
->load($nid);
return $node
->getType();
}