public function TFTController::accessAjaxGetFolder in Taxonomy File Tree 8
Same name and namespace in other branches
- 3.x src/Controller/TFTController.php \Drupal\tft\Controller\TFTController::accessAjaxGetFolder()
Returns folder access flag.
Parameters
\Drupal\Core\Session\AccountInterface $account: User account.
Return value
\Drupal\Core\Access\AccessResult Access flag.
1 string reference to 'TFTController::accessAjaxGetFolder'
File
- src/
Controller/ TFTController.php, line 608
Class
- TFTController
- Class TFTController.
Namespace
Drupal\tft\ControllerCode
public function accessAjaxGetFolder(AccountInterface $account) {
$tid = $_GET['tid'];
$term = Term::load($tid);
if (isset($term) && $term
->access('view', $account)) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}