Created
March 26, 2014 10:16
-
-
Save rob-ot-dot-be/9780276 to your computer and use it in GitHub Desktop.
Flexform settings from BE modulle use in controller extbase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* action flexformcaltypes | |
* | |
* @param \Typo3\Caltool\Domain\Model\Widget $widget | |
* @return void | |
*/ | |
public function flexformcaltypesAction($params, $conf) { | |
$data = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($params['row']['pi_flexform']); | |
$widgetId = $data['data']['sDEF']['lDEF']['settings.berekenenkel']['vDEF']; | |
$extbaseObjectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager'); | |
$wrep = $extbaseObjectManager->get('Typo3\Caltool\Domain\Repository\WidgetRepository'); | |
$widgets = $wrep->findByUid($widgetId ); | |
if(isset($widgets)){ | |
foreach($widgets->getCalvars() as $calvar){ | |
$params['items'][] = array( $calvar->getTitle(), $calvar->getUid() ); | |
} | |
} | |
return $params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment