(a) A court shall issue a preliminary or special injunction only after written notice and hearing unless it appears to the satisfaction of the court that immediate and irreparable injury will be sustained before notice can be given or a hearing held, in which case the court may issue a preliminary or special injunction without a hearing or without notice. In determining whether a preliminary or special injunction should be granted and whether notice or a hearing should be required, the court may act on the basis of the averments of the pleadings or petition and may consider affidavits of parties or third persons or any other proof which the court may require. (b) Except when the plaintiff is the Commonwealth of Pennsylvania, a political subdivision or a department, board, commission, instrumentality or officer of the Commonwealth or of a political subdivision, a preliminary or special injunction shall be granted only if
(1) the plaintiff files a bond in an amount fixed and with security approved by the court, naming the Commonwealth as obligee, conditioned that if the injunction is dissolved because improperly granted or for failure to hold a hearing, the plaintiff shall pay to any person injured all damages sustained by reason of granting the injunction and all legally taxable costs and fees, or(2) the plaintiff deposits with the prothonotary legal tender of the United States in an amount fixed by the court to be held by the prothonotary upon the same condition as provided for the injunction bond. (c) Any party may move at any time to dissolve an injunction.(d) An injunction granted without notice to the defendant shall be deemed dissolved unless a hearing on the continuance of the injunction is held within five days after the granting of the injunction or within such other time as the parties may agree or as the court upon cause shown shall direct. (e) After a preliminary hearing, the court shall make an order dissolving, continuing or modifying the injunction.(f)(1) When a preliminary or special injunction involving freedom of expression is issued, either without notice or after notice and hearing, the court shall hold a final hearing within three days after demand by the defendant. A final order shall be filed in the office of the prothonotary within twenty-four hours after the close of the hearing. If the final hearing is not held within the three-day period, or if the final order is not filed within twenty-four hours after the close of the hearing, the injunction shall be deemed dissolved.