public function removeFromSessionAction() { $key = "document_" . $this->getParam("id"); Session::useSession(function ($session) use($key) { $session->{$key} = null; }, "pimcore_documents"); $this->_helper->json(["success" => true]); }