Before doing anything else, put a portal where the light funnel is flowing, then put another portal on the wall across from the turret that is aiming toward the big red button. This will push the turret into the pit behind it. When you move the portals, the turret will fall to its doom.
The key to solving this room is realizing that the big red button on your side causes the light funnel to reverse direction. First, put a portal on the wall where the funnel is flowing. Then put a portal on the wall across from the frankencube so that the cube gets caught in the funnel.
Now step on the big red button to reverse the flow of the funnel. When the cube reaches the left side of the room, before it goes through the portal, move the portal onto the wall across from you such that the cube gets caught in it. Get off of the big red button. The cube should be pushed toward you. Grab it and put it on the big red button, making sure that the funnel won't move it off of the button.
Use portals to make the light funnel come over to the ledge that you are on. You want to be able to walk into the funnel while it is orange, letting it pull you to the side of the room with the exit. Get out of the funnel on that side of the room.
Use a portal to push the frankencube off of the big red button so it's no longer reversing the flow of the funnel. Then put a portal on the floor next to the ledge with the exit. Get in the funnel and it will push you up to where you can walk to the exit. Go through.