There are two ways of doing it. The usual way is by near unanimity on the Business Committee. The vast majority of members will give agreement, and the Speaker will judge if there is near unanimity. It's possible for the government to go into an extended sitting on a government motion, but it's quite reluctant to do that because generally the business that is dealt with under extended sittings is something that most or all parties agree to. It's been used also exclusively for passing the Treaty of Waitangi settlement bills, which are about redressing indigenous Maori grievances over land confiscation in the 1870s. There's wide political support for doing that, and so parties generally all consent to do it, and that's been a very useful way of progressing that legislation that has wide agreement and that's not controversial for the majority of people.
On May 17th, 2016. See this statement in context.