public function AccessStorage::getLangCode in Permissions by Term 8.2
Same name and namespace in other branches
- 8 src/Service/AccessStorage.php \Drupal\permissions_by_term\Service\AccessStorage::getLangCode()
Parameters
$nid:
Return value
array
1 call to AccessStorage::getLangCode()
- AccessStorage::computePermittedTids in src/
Service/ AccessStorage.php
File
- src/
Service/ AccessStorage.php, line 617
Class
- AccessStorage
- Class AccessStorage.
Namespace
Drupal\permissions_by_term\ServiceCode
public function getLangCode($nid) {
$query = $this->database
->select('node', 'n')
->fields('n', [
'langcode',
])
->condition('n.nid', $nid);
return $query
->execute()
->fetchAssoc()['langcode'];
}