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

execute() public method

Execute the action
public execute ( )
    public function execute()
    {
        $this->header->addJS(FrontendLocationModel::getPathToMapStyles());
        parent::execute();
        // define Google Maps API key
        $apikey = $this->get('fork.settings')->get('Core', 'google_maps_key');
        // check Google Maps API key, otherwise redirect to settings
        if ($apikey === null) {
            $this->redirect(BackendModel::createURLForAction('Index', 'Settings'));
        }
        // add js
        $this->header->addJS('https://maps.googleapis.com/maps/api/js?key=' . $apikey, null, false, true, false);
        $this->loadData();
        $this->loadDataGrid();
        $this->loadSettingsForm();
        $this->parse();
        $this->display();
    }