Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Commit

Permalink
add infowindows
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Duemmler committed Sep 9, 2016
1 parent 2da8197 commit af191d4
Show file tree
Hide file tree
Showing 707 changed files with 102 additions and 731 deletions.
1 change: 0 additions & 1 deletion Build/node_modules

This file was deleted.

4 changes: 4 additions & 0 deletions Classes/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ static public function extLocalconf()
array('Address' => 'listNew'),
array('Address' => 'listNew')
);
ExtensionUtility::configurePlugin('BERGWERK.' . self::$_extKey, 'Pi6',
array('MarkerWindow' => 'get'),
array('MarkerWindow' => 'get')
);
}

/**
Expand Down
7 changes: 7 additions & 0 deletions Classes/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

namespace BERGWERK\BwrkAddress;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;

/**
* Class Configuration
Expand All @@ -15,4 +18,8 @@ public static function getTypes()
{
return self::getConfiguration('plugin.tx_bwrkaddress.setup.types.');
}
public static function getStoragePid()
{
return self::getConfiguration('plugin.tx_bwrkaddress.settings.storagePid');
}
}
18 changes: 18 additions & 0 deletions Classes/Controller/MarkerWindowController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
namespace BERGWERK\BwrkAddress\Controller;

use BERGWERK\BwrkAddress\Domain\Repository\AddressRepository;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
use TYPO3\CMS\Extensionmanager\Controller\ActionController;

class MarkerWindowController extends ActionController
{
public function getAction()
{
$addressUid = (int)$this->request->getArgument('uid');
if (!empty($addressUid)) {
$address = AddressRepository::create()->findByUid($addressUid);
$this->view->assign('address', $address);
}
}
}
47 changes: 47 additions & 0 deletions Classes/Utility/Eid/MarkerWindow.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace BERGWERK\BwrkAddress\Utility\Eid;

use BERGWERK\BwrkAddress\Configuration;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Core\Bootstrap;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\Utility\EidUtility;

class MarkerWindow {
public function run()
{
$bootstrap = new Bootstrap();

$pId = (GeneralUtility::_GET('id') ? GeneralUtility::_GET('id') : 1);

$GLOBALS['TSFE'] = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $pId, 0, true);
$GLOBALS['TSFE']->connectToDB();
$GLOBALS['TSFE']->fe_user = EidUtility::initFeUser();
$GLOBALS['TSFE']->id = $pId;
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getConfigArray();
$GLOBALS['TSFE']->cObj = new ContentObjectRenderer();

echo $bootstrap->run('', array(
'pluginName' => 'Pi6',
'vendorName' => 'BERGWERK',
'extensionName' => 'BwrkAddress',
'controller' => 'MarkerWindow',
'action' => 'get',
'mvc' => array(
'requestHandlers' => array(
'TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler' => 'TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler'
)
),
'settings' => array(),
'persistence' => array(
'storagePid' => Configuration::getStoragePid()
)
));
}
}
$run = GeneralUtility::makeInstance('BERGWERK\\BwrkAddress\\Utility\\Eid\\MarkerWindow');
$run->run();
14 changes: 14 additions & 0 deletions Resources/Private/Templates/MarkerWindow/Get.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{namespace bwrk=BERGWERK\BwrkAddress\ViewHelpers\Address}

<f:if condition="{address}">
<div class="tx-bwrkaddress-infowindow">
<h3>{address.title}</h3>
<p>
<bwrk:entry address="{address}" entryType="street_address"/>
<br>
<bwrk:entry address="{address}" entryType="zip"/>
<bwrk:entry address="{address}" entryType="city"/>
<br>
</p>
</div>
</f:if>
12 changes: 0 additions & 12 deletions Resources/Private/src/bower_components/icon-collection/.bower.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Diff not rendered.
Diff not rendered.
Loading

0 comments on commit af191d4

Please sign in to comment.