request->get (); $IDsInCart = array(); if (Yii::$app->params ['useLogin'] && ! Yii::$app->user->isGuest) { $inCart = DBInterface::getShoppingCart ( Yii::$app->user->identity->id ); $shoppingCart = sizeof ( $inCart ); foreach($inCart as $ArrayInCart) { $IDsInCart[] = $ArrayInCart['tripleidstoreid'];} } if(Yii::$app->user->isGuest) { $shoppingCart = ''; } $treeCult = TreeView::getTree('cultivated', $IDsInCart); $treeWild = TreeView::getTree('wild', $IDsInCart); return $this->render ( 'treeoflife', [ "treeCult" => $treeCult, "treeWild" => $treeWild, "shoppingCart" => $shoppingCart ] ); } }