{"version":"1.0","type":"rich","title":"Gist 3337600","description":"This example shows a PHP controller action for updating a guest reservation and its associated room information in a Yii-based application. The `actionUpdate` method loads both the reservation model and the room information model using `loadModel` and `loadRoomInformationModel`, then saves the posted attributes from `$_POST['GuestReservations']` and `$_POST['RoomInformation']` if both are submitted. On success, it redirects to the room view page; otherwise, it renders the partial again with validation errors. The code relies on Yii’s ActiveRecord `save()` method and `CHttpException` for error handling, with data sourced from form submissions.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-3337600?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}