(a) An order of disposition shall be in effect for the shortest time necessary to accomplish the purposes of the order and for not more than two years. A written disposition order shall state the length of time the order is to be in effect. An order of extension may be made if:
(1) A hearing is held prior to the expiration of the order upon motion of DFCS, DJJ, the petitioner, the prosecuting attorney, or on the court's own motion;
(2) Reasonable notice of the factual basis of the motion and of the hearing and opportunity to be heard are given to the parties affected;
(3) The court finds that the extension is necessary to accomplish the purposes of the order extended; and
(4) The extension does not exceed two years from the expiration of the prior order.
(b) The court may terminate an order of disposition or an extension of such a disposition order prior to its expiration, on its own motion or an application of a party, if it appears to the court that the purposes of the order have been accomplished.
(c) When a child adjudicated as a child in need of services reaches 18 years of age, all orders affecting him or her then in force shall terminate and he or she shall be discharged from further obligation or control.