Document toolboxDocument toolbox

Location Demolish Event

The Location Demolish Event can be triggered using Custom Logic. The following parameters are Required to execute the Event.

Location Demolish
/**
* Event: Location Demolish
* Listener Class: Application_Model_Location_Location
* Listener Method: eventDemolish
*/
//In this code example, a building with 10 floors is demolished and one of the floors has 10 rooms.

PCR_Event::attachDb(
    "location-demolish",
    ["Application_Model_Location_Location" => "eventDemolish"]
);
PCR_Event::trigger(
    "location-demolish", 
   [
	"recid" => 331648, //RecID of Parent location getting Demolished
	"recids" =>
	[
		"331648", 	//RecID of Parent location getting Demolished
		"331649", 	//RecID of location getting Demolished
		"331699", 	//RecID of location getting Demolished
		"331700", 	//RecID of location getting Demolished
		"331701", 	//RecID of location getting Demolished
		"331702", 	//RecID of location getting Demolished
		"331703", 	//RecID of location getting Demolished
		"331704", 	//RecID of location getting Demolished
		"331705", 	//RecID of location getting Demolished
		"331706", 	//RecID of location getting Demolished
		"331707", 	//RecID of location getting Demolished
		"331708", 	//RecID of location getting Demolished
		"331658", 	//RecID of location getting Demolished
		"331650", 	//RecID of location getting Demolished
		"331651", 	//RecID of location getting Demolished
		"331652", 	//RecID of location getting Demolished
		"331653", 	//RecID of location getting Demolished
		"331654", 	//RecID of location getting Demolished
		"331655", 	//RecID of location getting Demolished
		"331656", 	//RecID of location getting Demolished
		"331657" 	//RecID of location getting Demolished
	],
	"comment" => "This is a comment",

	"eventBroadcastBy" => "216121",
	"eventBroadcastTime" => "Oct 3, 2022, 2:04 pm",
	"eventBroadcastDayofWeek" => "1",
	"eventBroadcastHourMin" => "1404",
	]
);