Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2022.2

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

Code Block
titleLocation Demolish
linenumberstrue
/**
* 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",
	]
);