Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / permissions_by_term / src / Service / NodeEntityBundleInfo.php
index 54dec437da25b7ff3dadf870857ca6a818f83562..72c9016a24eac3844346f4d72abc73b9ab80ca21 100644 (file)
@@ -20,7 +20,7 @@ class NodeEntityBundleInfo {
   private $accessStorage;
 
   /**
-   * @var Term
+   * @var TermHandler
    */
   private $term;
 
@@ -38,13 +38,13 @@ class NodeEntityBundleInfo {
    * Info constructor.
    *
    * @param AccessStorage   $accessStorage
-   * @param Term            $term
+   * @param TermHandler            $term
    * @param TwigEnvironment $twig
    * @param Connection      $database
    */
   public function __construct(
     AccessStorage $accessStorage,
-    Term $term,
+    TermHandler $term,
     TwigEnvironment $twig,
     Connection $database
   ) {
@@ -55,19 +55,24 @@ class NodeEntityBundleInfo {
   }
 
   /**
-   * @param string   $viewFilePath
-   * @param int|null $nid
+   * @param $viewFilePath
+   * @param null $nid
+   * @param string $langcode
+   *
    * @return string
+   * @throws \Twig_Error_Loader
+   * @throws \Twig_Error_Runtime
+   * @throws \Twig_Error_Syntax
    */
-  public function renderNodeDetails($viewFilePath, $nid = null) {
+  public function renderNodeDetails($viewFilePath, $langcode, $nid = null) {
     $roles = null;
     $users = null;
 
     if (!empty($nid)) {
       $tids = $this->term->getTidsByNid($nid);
       if (!empty($tids)) {
-        $uids = $this->accessStorage->getUserTermPermissionsByTids($tids);
-        $rids = $this->accessStorage->getRoleTermPermissionsByTids($tids);
+        $uids = $this->accessStorage->getUserTermPermissionsByTids($tids, $langcode);
+        $rids = $this->accessStorage->getRoleTermPermissionsByTids($tids, $langcode);
       }
     }
 
@@ -125,4 +130,4 @@ class NodeEntityBundleInfo {
     return $returnArray;
   }
 
-}
\ No newline at end of file
+}