2013-09-23 19:30:44 +00:00
|
|
|
<?php
|
|
|
|
|
2019-01-25 13:51:46 +00:00
|
|
|
if (!defined('sugarEntry') || !sugarEntry) {
|
2013-09-23 19:30:44 +00:00
|
|
|
die('Not A Valid Entry Point');
|
2019-01-25 13:51:46 +00:00
|
|
|
}
|
2013-09-23 19:30:44 +00:00
|
|
|
|
2023-06-01 13:10:03 +00:00
|
|
|
#[\AllowDynamicProperties]
|
2019-01-25 13:51:46 +00:00
|
|
|
class LeadsJjwg_MapsLogicHook
|
|
|
|
{
|
2019-01-25 14:28:56 +00:00
|
|
|
public $jjwg_Maps;
|
|
|
|
public function __construct()
|
2019-01-25 13:51:46 +00:00
|
|
|
{
|
2016-01-14 15:21:33 +00:00
|
|
|
$this->jjwg_Maps = get_module_info('jjwg_Maps');
|
|
|
|
}
|
|
|
|
|
2019-03-19 01:02:02 +00:00
|
|
|
|
2016-04-29 14:12:28 +00:00
|
|
|
|
|
|
|
|
2019-01-25 14:28:56 +00:00
|
|
|
public function updateGeocodeInfo(&$bean, $event, $arguments)
|
2019-01-25 13:51:46 +00:00
|
|
|
{
|
2013-09-23 19:30:44 +00:00
|
|
|
// before_save
|
2016-01-14 15:21:33 +00:00
|
|
|
if ($this->jjwg_Maps->settings['logic_hooks_enabled']) {
|
|
|
|
$this->jjwg_Maps->updateGeocodeInfo($bean);
|
2013-09-23 19:30:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-25 14:28:56 +00:00
|
|
|
public function updateRelatedMeetingsGeocodeInfo(&$bean, $event, $arguments)
|
2019-01-25 13:51:46 +00:00
|
|
|
{
|
2013-09-23 19:30:44 +00:00
|
|
|
// after_save
|
2016-01-14 15:21:33 +00:00
|
|
|
if ($this->jjwg_Maps->settings['logic_hooks_enabled']) {
|
|
|
|
$this->jjwg_Maps->updateRelatedMeetingsGeocodeInfo($bean);
|
2013-09-23 19:30:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|