Frontend\Modules\Location\Actions\Index::execute PHP Method

execute() public method

Execute the extra
public execute ( )
    public function execute()
    {
        // define Google Maps API key
        $apikey = $this->get('fork.settings')->get('Core', 'google_maps_key');
        // check Google Maps API key, otherwise show error
        if ($apikey == null) {
            trigger_error('Please provide a Google Maps API key.');
        }
        $this->addJS('https://maps.googleapis.com/maps/api/js?key=' . $apikey, true, false);
        $this->addJS(FrontendLocationModel::getPathToMapStyles(false), true);
        parent::execute();
        $this->loadTemplate();
        $this->loadData();
        $this->parse();
    }