Update Addon functions and calls

Update function names and calls for Addon class.
This commit is contained in:
Adam Magness 2018-01-17 13:42:40 -05:00
parent 213f6ae1a1
commit 11cf36105c
73 changed files with 544 additions and 464 deletions

View file

@ -4,6 +4,8 @@
*/
namespace Friendica\Util;
use Friendica\Core\Addon;
/**
* Leaflet Map related functions
*/
@ -12,13 +14,13 @@ class Map {
$coord = trim($coord);
$coord = str_replace([',','/',' '],[' ',' ',' '],$coord);
$arr = ['lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => ''];
call_hooks('generate_map',$arr);
Addon::callHooks('generate_map',$arr);
return ($arr['html']) ? $arr['html'] : $coord;
}
public static function byLocation($location) {
$arr = ['location' => $location, 'html' => ''];
call_hooks('generate_named_map',$arr);
Addon::callHooks('generate_named_map',$arr);
return ($arr['html']) ? $arr['html'] : $location;
}
}