Public officials, agents, or representatives, in carrying out any of the provisions of this Article, shall not take charge of any child over the objection of either of the child's parents, or of the persons standing in loco parentis to the child, except pursuant to court order.
305 ILCS 5/4-11