TYPO3.CMS 7.6 Schnipsel: Unterschied zwischen den Versionen

Aus Vosp.info
Wechseln zu:Navigation, Suche
(Die Seite wurde neu angelegt: „ = extbase (php) = == Controller == === Url/Link erstellen === <source lang=php> $uriBuilder = $this->controllerContext->getUriBuilder(); $uriBuilder->r…“)
 
Zeile 1: Zeile 1:
  
 
= extbase (php) =
 
= extbase (php) =
 +
 +
== Generell ==
 +
<source lang=php>
 +
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
 +
$ncmail = $objectManager->get('Netzcoop\Extension\Services\Ncmail');
 +
</source>
 
== Controller ==
 
== Controller ==
 
=== Url/Link erstellen ===
 
=== Url/Link erstellen ===

Version vom 16. Dezember 2015, 16:22 Uhr

extbase (php)

Generell

$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
$ncmail = $objectManager->get('Netzcoop\Extension\Services\Ncmail');

Controller

Url/Link erstellen

			$uriBuilder = $this->controllerContext->getUriBuilder();
			$uriBuilder->reset();
			$uriBuilder->setArguments(array(
			  strtolower($this->extensionName) => array(
				'param1' => $user->getUid(),
				 'param2' => 'test',
				  
			  )
			));
			$uri = $uriBuilder->build();