Пример #1
0
 /**
  * @test
  */
 public function varDumpShowsPropertiesOfStdClassObjects()
 {
     $testObject = new \stdClass();
     $testObject->foo = 'bar';
     $result = $this->debugger->var_dump($testObject, null, 8, true, false, true);
     $this->assertRegExp('/foo.*bar/', $result);
 }
Пример #2
0
 /**
  * @test
  */
 public function varDumpShowsPropertiesOfStdClassObjects()
 {
     $testObject = new \stdClass();
     $testObject->foo = 'bar';
     $result = $this->debugger->var_dump($testObject, NULL, 8, TRUE, FALSE, TRUE);
     $this->assertRegExp('/foo.*bar/', $result);
 }
Пример #3
0
 /**
  * @test
  * @author Anja Leichsenring <*****@*****.**>
  */
 public function debuggerDoesNotRewindInstanceOfArrayAccess()
 {
     $parameters = array();
     for ($i = 0; $i < 5; $i++) {
         $argument = new \TYPO3\CMS\Extbase\Mvc\Controller\Argument('argument_' . $i, 'integer');
         $parameters[$i] = $argument;
     }
     /** @var $arguments \TYPO3\CMS\Fluid\Core\ViewHelper\Arguments */
     $arguments = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\Arguments', array('dummy'), array('arguments' => $parameters));
     $arguments->expects($this->never())->method('rewind');
     $this->debugger->var_dump($arguments, NULL, 8, TRUE, FALSE, TRUE);
 }
 /**
  * @return mixed
  */
 public function render()
 {
     $nodes = array();
     foreach ($this->childViewHelperNodes as $viewHelperNode) {
         $viewHelper = $viewHelperNode->getUninitializedViewHelper();
         $arguments = $viewHelper->prepareArguments();
         $givenArguments = $viewHelperNode->getArguments();
         $viewHelperReflection = new \ReflectionClass($viewHelper);
         $viewHelperDescription = $viewHelperReflection->getDocComment();
         $viewHelperDescription = htmlentities($viewHelperDescription);
         $viewHelperDescription = '[CLASS DOC]' . LF . $viewHelperDescription . LF;
         $renderMethodDescription = $viewHelperReflection->getMethod('render')->getDocComment();
         $renderMethodDescription = htmlentities($renderMethodDescription);
         $renderMethodDescription = implode(LF, array_map('trim', explode(LF, $renderMethodDescription)));
         $renderMethodDescription = '[RENDER METHOD DOC]' . LF . $renderMethodDescription . LF;
         $argumentDefinitions = array();
         foreach ($arguments as &$argument) {
             $name = $argument->getName();
             $argumentDefinitions[$name] = ObjectAccess::getGettableProperties($argument);
         }
         $sections = array($viewHelperDescription, DebuggerUtility::var_dump($argumentDefinitions, '[ARGUMENTS]', 4, TRUE, FALSE, TRUE), DebuggerUtility::var_dump($givenArguments, '[CURRENT ARGUMENTS]', 4, TRUE, FALSE, TRUE), $renderMethodDescription);
         array_push($nodes, implode(LF, $sections));
     }
     return '<pre>' . implode(LF . LF, $nodes) . '</pre>';
 }
Пример #5
0
 /**
  * @param mixed $value
  *
  * @return bool|void
  */
 public function isValid($value)
 {
     $this->errors = array();
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($value, 'AGB');
     if (strlen($value) < 2) {
         $this->addError('Um Sie persönlich ansprechen zu können, benötigen wir Ihre Vorname.', 1806198601, array(htmlspecialchars($value)));
         return false;
     }
     return true;
 }
Пример #6
0
 /**
  * @param $parameters
  */
 protected function writeDebugMessage($parameters)
 {
     $message = isset($parameters['msg']) ? $parameters['msg'] : '';
     if (TYPO3_MODE == 'BE') {
         DebugUtility::debug($parameters, $parameters['extKey'], 'DevLog ext:solr: ' . $message);
     } else {
         echo $message . ':<br/>';
         DebuggerUtility::var_dump($parameters);
     }
 }
 public function initializeIndexAction()
 {
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->arguments['file']);
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($_POST);
     $resolutionMappingConfig = $this->arguments['file']->getPropertyMappingConfiguration();
     $resolutionMappingConfig->setTypeConverter($this->objectManager->get('CIC\\Cicbase\\Property\\TypeConverter\\FileReferenceConverter'));
     $resolutionMappingConfig->setTypeConverterOption('CIC\\Cicbase\\Property\\TypeConverter\\FileReferenceConverter', 'propertyPath', 'file');
     $resolutionMappingConfig->setTypeConverterOption('CIC\\Cicbase\\Property\\TypeConverter\\FileReferenceConverter', 'maxSize', 20971520);
     $resolutionMappingConfig->setTypeConverterOption('CIC\\Cicbase\\Property\\TypeConverter\\FileReferenceConverter', 'allowedTypes', array('pdf' => 'application/pdf', 'gif' => 'image/gif', 'jpg' => 'image/jpg', 'jpeg' => 'image/jpeg', 'png' => 'image/png', 'html' => 'text/html', 'htm' => 'text/html', 'txt' => 'text/plain', 'xml' => 'text/xml'));
 }
Пример #8
0
 /**
  * @param mixed $property
  *
  * @return bool|void
  */
 public function isValid($property)
 {
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($property, 'errors');
     $agb = $this->options['agb'];
     if ($agb) {
         return TRUE;
     }
     $this->addError('AGB Fehler', 1393152387, array(htmlspecialchars($property)));
     return FALSE;
 }
Пример #9
0
 /**
  * Returns the extra data as a nice HTML dump.
  *
  * @param array $PA Information related to the field
  * @param \TYPO3\CMS\Backend\Form\FormEngine $formObject Reference to calling TCEforms object
  *
  * @return string The HTML for the form field
  */
 public function displayExtraData($PA, $formObject)
 {
     if (empty($PA['row']['extra_data'])) {
         $html = $this->getLanguageObject()->sL('LLL:EXT:devlog/Resources/Private/Language/locallang.xlf:no_extra_data');
     } else {
         $data = unserialize(gzuncompress($PA['row']['extra_data']));
         $html = \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($data, NULL, 10, FALSE, TRUE, TRUE);
     }
     return $html;
 }
Пример #10
0
 /**
  * list action
  *
  * @param string $search
  */
 public function listAction($search = '')
 {
     // alternative possibility to retrieve the POST Argument:
     #if ($this->request->hasArgument('search')) {
     #	$search = $this->request->getArgument('search');
     #}
     $limit = $this->settings['blog']['max'] ?: NULL;
     $this->view->assign('blogs', $this->blogRepository->findSearchForm($search, $limit));
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->blogRepository->findSearchForm($search, $limit), 'settings');
     $this->view->assign('search', $search);
 }
Пример #11
0
 public function where($plz)
 {
     $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
     $querySettings->setRespectStoragePage(FALSE);
     $this->setDefaultQuerySettings($querySettings);
     $query = $this->createQuery();
     $query->matching($query->equals('plz', $plz));
     /** @var Typo3DbQueryParser $queryParser */
     $queryParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbQueryParser');
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->parseQuery($query));
     return $query->execute();
 }
 public function initAction()
 {
     // TODO - DO NOT STORE SENSITIVE INFORMATION HARD-CODED IN YOUR CODE!
     $secret = 'ckumcPIciS0GtJjBNqXACVYKMmTbRQ26C3yVXwlz';
     $companyId = 'LBtrEYlX3DNLyLHqnr2S';
     //configure plenigo:
     //\Plenigo\PlenigoForNews\Classes\plenigo_sdk\src\plenigo\PlenigoManager::configure($secret, $companyId);
     $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->premiumContentProductRepository->findAll());
     /** @var $plenigoManager \Plenigo\PlenigoForNews\plenigo_sdk\src\plenigo\ */
     $plenigoManager = $objectManager->create('Plenigo\\PlenigoForNews\\plenigo_sdk\\src\\plenigo\\PlenigoManager');
 }
 /**
  * @return void
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $exception) {
         throw $exception;
     } catch (\Exception $exception) {
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($exception);
         if ($this->isAjax) {
             $output = $exception->getMessage();
             if ($this->response instanceof \TYPO3\CMS\Extbase\Mvc\Web\Response) {
                 $this->response->setStatus(500);
             }
             $this->response->appendContent($output);
         } else {
             throw $exception;
         }
     }
 }
Пример #14
0
 /**
  * action list
  * 
  * @return void
  */
 public function listAction()
 {
     // get page id of this page
     $pageid = intval($GLOBALS['TSFE']->id);
     if ($pageid == 520) {
         //$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
         //$tsService = new \TYPO3\CMS\Extbase\Service\TypoScriptService();
         //$this->settings = $tsService->convertTypoScriptArrayToPlainArray($extbaseFrameworkConfiguration['plugin.']['tx_woehrlrssfeed.']['settings.']);
         $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         $templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath']);
         $partialRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['partialRootPath']);
         //\TYPO3\CMS\Core\Utility\DebugUtility::debug($extbaseFrameworkConfiguration);
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->settings['plugin.']);
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($templateRootPath);
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($partialRootPath);
         //$feeds = $this->feedRepository->findAll();
     }
     $this->view->assign('feeds', $feeds = NULL);
 }
Пример #15
0
 /**
  * action show
  * 
  * @param \Gigabonus\Gbpartner\Domain\Model\Category $category
  * @return void
  */
 public function showAction(\Gigabonus\Gbpartner\Domain\Model\Category $category = null)
 {
     if ($category === NULL) {
         DebuggerUtility::var_dump($this->partnerRepository->findAll());
         return;
     }
     // DebuggerUtility::var_dump($this->partnerRepository->findByCategory($category));
     $query = $this->partnerRepository->createQuery();
     // $query->getQuerySettings()->setIgnoreEnableFields(true);
     $query->getQuerySettings()->setRespectSysLanguage(false);
     // $query->getQuerySettings()->setRespectStoragePage(FALSE);
     // $query = $query->matching($query->logicalNot($query->equals('image', 0)));
     $result = $query->execute();
     // DebuggerUtility::var_dump($result);
     /*
     $object = NULL;
     if (count($result) > 0) {
         $object = $result->getFirst();
         $this->identityMap->registerObject($object, $uid);
     }
     */
     /*
     foreach ($category as $item) {
         
     }
     
     $header = $content->getHeader();
     */
     /*
     $categoryId = $category->getUid();
     $query = $this->partnerRepository->createQuery();
     $query->matching($query->like('category', $categoryId));
     DebuggerUtility::var_dump($query->execute());
     */
     $this->view->assign('category', $category);
 }
Пример #16
0
 /**
  * @return mixed
  */
 protected function debug()
 {
     $settings = $this->getSettings();
     $debugOutputEnabled = $this->assertDebugEnabled();
     $useDebugUtility = FALSE === isset($settings['useDebugUtility']) || isset($settings['useDebugUtility']) && $settings['useDebugUtility'] > 0;
     $debugInformation = $this->getDebugInformation();
     if (TRUE === $debugOutputEnabled) {
         if (TRUE === $useDebugUtility) {
             DebuggerUtility::var_dump($debugInformation);
             return '';
         } else {
             return var_export($debugInformation, TRUE);
         }
     }
 }
Пример #17
0
 /**
  * Directly output the contents of the file to the output
  * buffer. Should not take care of header files or flushing
  * buffer before. Will be taken care of by the Storage.
  *
  * @param string $identifier
  * @return void
  */
 public function dumpFileContents($identifier)
 {
     // TODO: Implement dumpFileContents() method.
     DebuggerUtility::var_dump(['$identifier' => $identifier], 'dumpFileContents');
 }
Пример #18
0
 /**
  * @param mixed $instance
  * @param boolean $plainText
  * @param integer $depth
  * @return void
  */
 public function debug($instance, $plainText = TRUE, $depth = 2)
 {
     $text = DebuggerUtility::var_dump($instance, NULL, $depth, $plainText, FALSE, TRUE);
     GeneralUtility::devLog('Flux variable dump: ' . gettype($instance), 'flux', GeneralUtility::SYSLOG_SEVERITY_INFO, $text);
 }
Пример #19
0
 /**
  * Debugs a SQL query from a QueryResult
  *
  * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $queryResult
  * @param boolean $explainOutput
  * @return void
  */
 public function debugQuery(\TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $queryResult, $explainOutput = FALSE)
 {
     $GLOBALS['TYPO3_DB']->debugOuput = 2;
     if ($explainOutput) {
         $GLOBALS['TYPO3_DB']->explainOutput = true;
     }
     $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = true;
     $queryResult->toArray();
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
     $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = false;
     $GLOBALS['TYPO3_DB']->explainOutput = false;
     $GLOBALS['TYPO3_DB']->debugOuput = false;
 }
Пример #20
0
 public function sendAction()
 {
     $formContent = $this->request->getArguments();
     $formValues = array_intersect_key($formContent['content'], array_flip(preg_grep('/_Required/', array_keys($formContent['content']))));
     $receiver = $this->settings['receiver'];
     $subject = $this->settings['subject'];
     $mailRaw = $this->settings;
     $validatedForm = $this->validateForms($formContent['content']);
     if ($validatedForm['reload'] == true) {
         $listParams['validated'] = true;
         $listParams['formValues'] = $formValues;
         $listParams['validatedForms'] = $validatedForm;
         $this->redirect('list', NULL, NULL, $listParams);
         return;
     }
     if (!$validatedForm['wdMailer_Email_Required']) {
         $recipient = $validatedForm['wdMailer_EmailFeedback_Required'];
     } else {
         $recipient = $validatedForm['wdMailer_Email_Required'];
     }
     $validatedForm = array_merge($formContent, $validatedForm);
     $mailTextReplaced = $this->replacePlaceholders($mailRaw, $validatedForm);
     \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($validatedForm);
     die;
     $this->sendMail($recipient, $receiver, $validatedForm, $subject, $mailTextReplaced);
 }
Пример #21
0
 /**
  * @return string
  */
 public function render()
 {
     $nodes = array();
     foreach ($this->childViewHelperNodes as $viewHelperNode) {
         $viewHelper = $viewHelperNode->getUninitializedViewHelper();
         $arguments = $viewHelper->prepareArguments();
         $givenArguments = $viewHelperNode->getArguments();
         $viewHelperReflection = new \ReflectionClass($viewHelper);
         $viewHelperDescription = $viewHelperReflection->getDocComment();
         $viewHelperDescription = htmlentities($viewHelperDescription);
         $viewHelperDescription = '[CLASS DOC]' . LF . $viewHelperDescription . LF;
         $renderMethodDescription = $viewHelperReflection->getMethod('render')->getDocComment();
         $renderMethodDescription = htmlentities($renderMethodDescription);
         $renderMethodDescription = implode(LF, array_map('trim', explode(LF, $renderMethodDescription)));
         $renderMethodDescription = '[RENDER METHOD DOC]' . LF . $renderMethodDescription . LF;
         $argumentDefinitions = array();
         foreach ($arguments as $argument) {
             $name = $argument->getName();
             $argumentDefinitions[$name] = ObjectAccess::getGettableProperties($argument);
         }
         $sections = array($viewHelperDescription, DebuggerUtility::var_dump($argumentDefinitions, '[ARGUMENTS]', 4, TRUE, FALSE, TRUE), DebuggerUtility::var_dump($givenArguments, '[CURRENT ARGUMENTS]', 4, TRUE, FALSE, TRUE), $renderMethodDescription);
         array_push($nodes, implode(LF, $sections));
     }
     if (0 < count($this->childObjectAccessorNodes)) {
         array_push($nodes, '[VARIABLE ACCESSORS]');
         $templateVariables = $this->templateVariableContainer->getAll();
         foreach ($this->childObjectAccessorNodes as $objectAccessorNode) {
             $path = $objectAccessorNode->getObjectPath();
             $segments = explode('.', $path);
             try {
                 $value = ObjectAccess::getProperty($templateVariables, array_shift($segments));
                 foreach ($segments as $segment) {
                     $value = ObjectAccess::getProperty($value, $segment);
                 }
                 $type = gettype($value);
             } catch (PropertyNotAccessibleException $error) {
                 $value = NULL;
                 $type = 'UNDEFINED/INACCESSIBLE';
             }
             $sections = array('Path: {' . $path . '}', 'Value type: ' . $type);
             if (TRUE === is_object($value)) {
                 $sections[] = 'Accessible properties on {' . $path . '}:';
                 $gettable = ObjectAccess::getGettablePropertyNames($value);
                 unset($gettable[0]);
                 foreach ($gettable as $gettableProperty) {
                     $sections[] = '   {' . $path . '.' . $gettableProperty . '} (' . gettype(ObjectAccess::getProperty($value, $gettableProperty)) . ')';
                 }
             } elseif (NULL !== $value) {
                 $sections[] = DebuggerUtility::var_dump($value, 'Dump of variable "' . $path . '"', 4, TRUE, FALSE, TRUE);
             }
             array_push($nodes, implode(LF, $sections));
         }
     }
     return '<pre>' . implode(LF . LF, $nodes) . '</pre>';
 }
 /**
  * action update
  * @param \MUM\BjrFreizeit\Domain\Model\Leisure $leisure
  * @return void
  *
  */
 public function updateAction(\MUM\BjrFreizeit\Domain\Model\Leisure $leisure)
 {
     $redirectParams = array();
     $args = $this->request->getArguments();
     $persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
     //\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($leisure);
     //\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($args);
     //exit();
     if ($leisure->_isDirty() || $leisure->_isNew()) {
         if ($leisure->_isNew()) {
             $organization = $this->findOrganizationBySession();
             if (!is_a($organization, '\\MUM\\BjrFreizeit\\Domain\\Model\\Organization')) {
                 $organization = 'Error';
                 $GLOBALS['TSFE']->fe_user->setKey("ses", "leisureChange", 'Der Artikel konnte nicht angelegt werden. Errorcode: 1413190651');
             } else {
                 //$leisure->copyDataFromOrganization($organization);
                 $leisure->setPid($organization->getLeisureFolderPid());
                 $this->leisureRepository->add($leisure);
                 //now organization ist persistent
                 $GLOBALS['TSFE']->fe_user->setKey("ses", "leisureChange", 'Der Artikel wurde neu angelegt.');
             }
         } else {
             $this->leisureRepository->update($leisure);
             $GLOBALS['TSFE']->fe_user->setKey("ses", "leisureChange", 'Der Artikel ' . $leisure->getTitle() . ' wurde geändert.');
         }
         //it is not persistent already, we have to do it!
         $persistenceManager->persistAll();
         DebuggerUtility::var_dump($_FILES['tx_bjrfreizeitfeadmin_leisure']['name']['image'], 'FILES INhalt: ');
     }
     if (strlen($_FILES['tx_bjrfreizeitfeadmin_leisure']['name']['image']) > 0) {
         if ($leisure->hasImage) {
             $leisure->setImage(null);
             $persistenceManager->persistAll();
         }
         $success = $this->doUploadImage($leisure);
         //\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($imageFileName);
         if ($success) {
             /** @var  $fileRepository \TYPO3\CMS\Core\Resource\FileRepository  */
             /*   $fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
                             $fileReferenceObject = $fileRepository->findFileReferenceByUid($referenceUid);
             
                             $leisure->setImage($fileReferenceObject);
                          */
             $this->leisureRepository->update($leisure);
             $persistenceManager->persistAll();
         }
         //DebuggerUtility::var_dump($leisure, 'Leisure');
         //exit;
     }
     /*    DebuggerUtility::var_dump($_FILES, '_Files');
             $fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileReferenceObject(1)->getOriginalFile();
             $fileReferenceData = $GLOBALS['TSFE']->sys_page->checkRecord('sys_file_reference', 1);
             DebuggerUtility::var_dump($fileObject, 'Fileobject');
             DebuggerUtility::var_dump($fileReferenceData, 'Filereference');
     
             exit;
         */
     $redirectParams['leisure'] = $leisure;
     $this->redirect('successUpdate', 'Leisure', NULL, $redirectParams);
 }
Пример #23
0
 /**
  * A wrapper for \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump().
  *
  * @param array $arguments
  * @param \Closure $renderChildrenClosure
  * @param RenderingContextInterface $renderingContext
  *
  * @return string
  */
 public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 {
     return DebuggerUtility::var_dump($renderChildrenClosure(), $arguments['title'], $arguments['maxDepth'], (bool) $arguments['plainText'], (bool) $arguments['ansiColors'], (bool) $arguments['inline'], $arguments['blacklistedClassNames'], $arguments['blacklistedPropertyNames']);
 }
Пример #24
0
 /**
  * Returns HTML-code, which is a visual representation of a multidimensional array
  * use \TYPO3\CMS\Core\Utility\GeneralUtility::print_array() in order to print an array
  * Returns FALSE if $array_in is not an array
  *
  * @param mixed $array_in Array to view
  * @return string HTML output
  */
 public static function viewArray($array_in)
 {
     return '<pre>' . DebuggerUtility::var_dump($array_in, '', 8, true, false, true) . '</pre>';
 }
 /**
  * action show
  *
  * @param \WHO\WhoShop\Domain\Model\Product $product
  * @return void
  */
 public function showAction(\WHO\WhoShop\Domain\Model\Product $product)
 {
     DebuggerUtility::var_dump($this->basketHandler->getOrder());
     $this->assignArray = array('product' => $product, 'articleInBasket' => $this->basketHandler->findItemInOrder($product->getUid())['productFound'], 'category' => $this->request->getArgument('category'), 'userIsLoggedIn' => $this->basketHandler->loginCheck());
     $this->view->assignMultiple($this->assignArray);
 }
 public function formAction(\WOEHRL\WoehrlStylecardantrag\Domain\Model\Stylecardantrag $stylecardantrag = NULL)
 {
     // $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     //   \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( $stylecardantrag, 'result');
     //die;
     if ($stylecardantrag) {
         if (empty($titel = $stylecardantrag->getTitel())) {
             $stylecardantrag->setTitel('0');
         }
         /* $data = array(
                         $gender = $stylecardantrag->getAnrede(),
                         $stylecardantrag->getTitel(),
                         $first_name = ucwords($stylecardantrag->getVorname()),
                         $last_name = ucwords($stylecardantrag->getNachname()),
                         $address = ucwords($stylecardantrag->getAdresse()),
                         $phone = $stylecardantrag->getTelefon(),
                         $mobile = $stylecardantrag->getMobil(),
                         $zip = $stylecardantrag->getPlz(),
                         $city = ucwords($stylecardantrag->getOrt()),
                         $birthday = $stylecardantrag->getGeburtsdatum(),
                         $email = $stylecardantrag->getEmail(),
                         $country = $stylecardantrag->getLand(),
                         $description = 'new.woehrl.de',
                         $Werbung = $stylecardantrag->isAgb()
         
                     );
                    */
         /* $birthday = strtotime($stylecardantrag->getGeburtsdatum());
                     $Minus18jahre = (strtotime('-18 Year'));
                     if($birthday < $Minus18jahre){
         
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( 'Fehler: Teilnahmeberechtigt sind Personen ab 18 Jahren'  , 'birthday');
                     }
         
         
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( $Minus18jahre , 'Minus18jahre');
         
         
         */
         $result = $this->getWSDL()->kundendatenAnlegen($gender = $stylecardantrag->getAnrede(), $stylecardantrag->getTitel(), $first_name = ucwords($stylecardantrag->getVorname()), $last_name = ucwords($stylecardantrag->getNachname()), $address = ucwords($stylecardantrag->getAdresse()), $phone = $stylecardantrag->getTelefon(), $mobile = $stylecardantrag->getMobil(), $zip = $stylecardantrag->getPlz(), $city = ucwords($stylecardantrag->getOrt()), $stylecardantrag->getGeburtsdatum(), $email = $stylecardantrag->getEmail(), $country = $stylecardantrag->getLand(), $description = 'new.woehrl.de', $Werbung = $stylecardantrag->isWerbung());
         if ($result) {
             $Identifikationsnummer = $result->item[0]->value;
             $email = $result->item[2]->value;
             $Aktion = $result->item[4]->value;
             $link = $this->controllerContext->getUriBuilder()->reset()->setArguments(array('tx_woehrlstylecardantrag_pi1[action]' => 'subscribe', 'tx_woehrlstylecardantrag_pi1[key]' => $Identifikationsnummer))->setTargetPageUid($this->settings['list_detail_pid'])->setCreateAbsoluteUri(true)->buildFrontendUri();
             $subject = "Bestätigung Ihrer stylecard-Anmeldung";
             //subject
             $controllerName = 'Stylecardantrag';
             $htmlTemplate = $this->getTemplateHtml($controllerName, 'Email', $optMarkers = array('EmpfaengerEmail' => $email, 'BestaetigungLink' => $link, 'Anrede' => $gender, 'Nachname' => $last_name));
             switch ($Aktion) {
                 case 'Kunde bereits aktiviert':
                     //--Kunde bereits aktiviert
                     // "Fehler: Es ist bereits ein Benutzer mit der E-Mail-Adresse ".$result->item[2]->value." angemeldet!"
                     $this->addFlashMessage($messageBody = "<div class='alert alert-danger' role='alert'>Fehler: Es ist bereits ein Benutzer mit der E-Mail-Adresse <b>" . $result->item[2]->value . "</b> angemeldet!</div>", $messageTitle = "", $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR, $storeInSession = FALSE);
                     break;
                 case 'Nicht aktivierter Kunde':
                     if ($this->sendMail($Identifikationsnummer, $email, $htmlTemplate, '', '', '', $subject)) {
                         $stylecardantrag->setMeldung('2');
                     }
                     if ($stylecardantrag->getEmail() == '*****@*****.**') {
                         $Identifikationsnummer = $result->item[0]->value;
                         $res = $this->getWSDL()->StylecardAntragAktivieren($Identifikationsnummer);
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($result, 'result');
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($stylecardantrag, 'stylecardantrag');
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($res, 'res');
                         die;
                     }
                     break;
                 case 'Neukunde':
                     if ($this->sendMail($Identifikationsnummer, $email, $htmlTemplate, '', '', '', $subject)) {
                         $stylecardantrag->setMeldung('2');
                     }
                     if ($stylecardantrag->getEmail() == '*****@*****.**') {
                         $Identifikationsnummer = $result->item[0]->value;
                         $res = $this->getWSDL()->StylecardAntragAktivieren($Identifikationsnummer);
                         $daten = $this->getWSDL()->GetStylecardInfos($Identifikationsnummer);
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($result, 'result');
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($stylecardantrag, 'stylecardantrag');
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($res, 'res');
                         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($daten, 'daten');
                         die;
                     }
                     break;
                 default:
                     $stylecardantrag->setMeldung('default');
             }
         }
     }
     $this->view->assign('stylecardantrag', $stylecardantrag);
 }
Пример #27
0
 /**
  * Returns HTML-code, which is a visual representation of a multidimensional array
  * use \TYPO3\CMS\Core\Utility\GeneralUtility::print_array() in order to print an array
  * Returns FALSE if $array_in is not an array
  *
  * @param mixed $array_in Array to view
  * @return string HTML output
  */
 public static function viewArray($array_in)
 {
     return '<pre>' . DebuggerUtility::var_dump($array_in, '', 8, TRUE, FALSE, TRUE) . '</pre>';
 }
Пример #28
0
 public function render()
 {
     $arguments['maxDepth'] = isset($this->arguments['maxDepth']) ? $this->arguments['maxDepth'] : 10;
     return DebuggerUtility::var_dump($this->arguments, $arguments['title'], $arguments['maxDepth'], (bool) $arguments['plainText'], (bool) $arguments['ansiColors'], (bool) $arguments['inline'], $arguments['blacklistedClassNames'], $arguments['blacklistedPropertyNames']);
 }
Пример #29
0
 /**
  * @param array $parameters
  * @param object $caller
  * @param boolean $cached If TRUE, treats this inclusion as happening in a cached context
  * @return void
  */
 public function buildAll(array $parameters, $caller, $cached = TRUE)
 {
     if (FALSE === $this->objectManager instanceof \TYPO3\CMS\Extbase\Object\ObjectManager) {
         $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
         $this->configurationManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
     }
     $settings = $this->getSettings();
     $cached = (bool) $cached;
     if (FALSE === self::$typoScriptAssetsBuilt && TRUE === isset($settings['asset']) && TRUE === is_array($settings['asset'])) {
         foreach ($settings['asset'] as $name => $typoScriptAsset) {
             if (FALSE === isset($GLOBALS['VhsAssets'][$name]) && TRUE === is_array($typoScriptAsset)) {
                 if (FALSE === isset($typoScriptAsset['name'])) {
                     $typoScriptAsset['name'] = $name;
                 }
                 Asset::createFromSettings($typoScriptAsset);
             }
         }
         self::$typoScriptAssetsBuilt = TRUE;
     }
     if (FALSE === isset($GLOBALS['VhsAssets']) || FALSE === is_array($GLOBALS['VhsAssets'])) {
         return;
     }
     $assets = $GLOBALS['VhsAssets'];
     $assets = $this->sortAssetsByDependency($assets);
     $assets = $this->manipulateAssetsByTypoScriptSettings($assets);
     $buildDebugRequested = isset($settings['asset']['debugBuild']) && $settings['asset']['debugBuild'] > 0;
     $assetDebugRequested = isset($settings['asset']['debug']) && $settings['asset']['debug'] > 0;
     $useDebugUtility = isset($settings['asset']['useDebugUtility']) && $settings['asset']['useDebugUtility'] > 0 || FALSE === isset($settings['asset']['useDebugUtility']);
     if (TRUE === ($buildDebugRequested || $assetDebugRequested)) {
         if (TRUE === $useDebugUtility) {
             DebuggerUtility::var_dump($assets);
         } else {
             echo var_export($assets, TRUE);
         }
     }
     $this->placeAssetsInHeaderAndFooter($assets, $cached);
 }
Пример #30
0
 /**
  * A wrapper for Tx_Extbase_Utility_Debugger::var_dump().
  *
  * @param string $title optional custom title for the debug output
  * @param integer $maxDepth Sets the max recursion depth of the dump (defaults to 8). De- or increase the number according to your needs and memory limit.
  * @param boolean $plainText If TRUE, the dump is in plain text, if FALSE the debug output is in HTML format.
  * @param boolean $ansiColors If TRUE, ANSI color codes is added to the plaintext output, if FALSE (default) the plaintext debug output not colored.
  * @param boolean $inline if TRUE, the dump is rendered at the position of the <f:debug> tag. If FALSE (default), the dump is displayed at the top of the page.
  * @param array $blacklistedClassNames An array of class names (RegEx) to be filtered. Default is an array of some common class names.
  * @param array $blacklistedPropertyNames An array of property names and/or array keys (RegEx) to be filtered. Default is an array of some common property names.
  * @return string
  */
 public function render($title = NULL, $maxDepth = 8, $plainText = FALSE, $ansiColors = FALSE, $inline = FALSE, $blacklistedClassNames = NULL, $blacklistedPropertyNames = NULL)
 {
     return \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->renderChildren(), $title, $maxDepth, (bool) $plainText, (bool) $ansiColors, (bool) $inline, $blacklistedClassNames, $blacklistedPropertyNames);
 }