Tex. Health & Safety Code § 593.044
(a) The court in which an application for a hearing is filed may order the proposed resident taken into protective custody if the court determines from certificates filed with the court that the proposed resident is:
(b) The judge of the court may order a health or peace officer to take the proposed resident into custody and transport the person to:
(c) If the proposed resident is a voluntary resident, the court for good cause may order the resident's detention in:
Added by Acts 1991, 72nd Leg., ch. 76, Sec. 1, eff. Sept. 1, 1991.
Acts 2015, 84th Leg., R.S., Ch. 1 (S.B. 219), Sec. 3.1445, eff. April 2, 2015.