Example #1
0
 /**
  * Creates a query object working on the given class name
  *
  * @param string $className The class name
  * @return Tx_Extbase_Persistence_QueryInterface
  */
 public function create($className)
 {
     $query = $this->objectManager->create('Tx_Extbase_Persistence_QueryInterface', $className);
     $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
     $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $querySettings->setStoragePageIds(t3lib_div::intExplode(',', $frameworkConfiguration['persistence']['storagePid']));
     $query->setQuerySettings($querySettings);
     return $query;
 }
	/**
	 * Parses variables again
	 *
	 * @param	array		Variables and Markers array
	 * @param	array		Variables and Labels array
	 * @param	string		"web" or "mail"
	 * @return 	string		Changed string
	 */
	public function render($variablesMarkers = array(), $variablesLabels = array(), $type = 'web') {
		$parseObject = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
		$parseObject->setTemplateSource($this->renderChildren());
		$parseObject->assignMultiple($this->div->htmlspecialcharsOnArray($variablesMarkers));

		$powermailAll = $this->div->powermailAll($variablesLabels, $this->configurationManager, $this->objectManager, $type, $this->settings);
		$parseObject->assign('powermail_all', $powermailAll);

		return html_entity_decode($parseObject->render());
	}
	/**
	 * ViewHelper combines Raw and RemoveXss Methods
	 *
	 * @return string
	 */
	public function render() {
		$string = $this->renderChildren();

		// parse string
		$parseObject = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
		$parseObject->setTemplateSource($string);
		$string = $parseObject->render();

		// remove XSS
		$string = t3lib_div::removeXSS($string);

		return $string;
	}
 /**
  * @return Tx_Doctrine2_Query
  */
 public function create($className)
 {
     $query = new Tx_Doctrine2_Query($className);
     $query->injectEntityManager($this->manager->getEntityManager());
     if (!$this->objectManager || !$this->configurationManager) {
         return $query;
     }
     $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_QuerySettingsInterface');
     $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $querySettings->setStoragePageIds(t3lib_div::intExplode(',', $frameworkConfiguration['persistence']['storagePid']));
     $query->setQuerySettings($querySettings);
     return $query;
 }
Example #5
0
 /**
  * Executes the query against the database and returns the result
  *
  * @return Tx_Extbase_Persistence_QueryResultInterface|array The query result object or an array if $this->getQuerySettings()->getReturnRawQueryResult() is TRUE
  * @api
  */
 public function execute()
 {
     if ($this->getQuerySettings()->getReturnRawQueryResult() === TRUE) {
         return $this->persistenceManager->getObjectDataByQuery($this);
     } else {
         return $this->objectManager->create('Tx_Extbase_Persistence_QueryResultInterface', $this);
     }
 }
 /**
  * Build parser configuration
  *
  * @return Tx_Fluid_Core_Parser_Configuration
  * @author Karsten Dambekalns <*****@*****.**>
  */
 protected function buildParserConfiguration()
 {
     $parserConfiguration = $this->objectManager->create('Tx_Fluid_Core_Parser_Configuration');
     if ($this->controllerContext->getRequest()->getFormat() === 'html') {
         $parserConfiguration->addInterceptor($this->objectManager->get('Tx_Fluid_Core_Parser_Interceptor_Escape'));
     }
     return $parserConfiguration;
 }
Example #7
0
 /**
  * Creates, adds and returns a new controller argument to this composite object.
  * If an argument with the same name exists already, it will be replaced by the
  * new argument object.
  *
  * @param string $name Name of the argument
  * @param string $dataType Name of one of the built-in data types
  * @param boolean $isRequired TRUE if this argument should be marked as required
  * @param mixed $defaultValue Default value of the argument. Only makes sense if $isRequired==FALSE
  * @return Tx_Extbase_MVC_Controller_Argument The new argument
  */
 public function addNewArgument($name, $dataType = 'Text', $isRequired = FALSE, $defaultValue = NULL)
 {
     $argument = $this->objectManager->create('Tx_Extbase_MVC_Controller_Argument', $name, $dataType);
     $argument->setRequired($isRequired);
     $argument->setDefaultValue($defaultValue);
     $this->addArgument($argument);
     return $argument;
 }
Example #8
0
 /**
  * Adds a ViewHelper node using the EscapeViewHelper to the given node.
  * If "escapingInterceptorEnabled" in the ViewHelper is FALSE, will disable itself inside the ViewHelpers body.
  *
  * @param Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface $node
  * @param integer $interceptorPosition One of the INTERCEPT_* constants for the current interception point
  * @return Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface
  * @author Karsten Dambekalns <*****@*****.**>
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function process(Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface $node, $interceptorPosition)
 {
     if ($interceptorPosition === Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER) {
         if (!$node->getUninitializedViewHelper()->isEscapingInterceptorEnabled()) {
             $this->interceptorEnabled = FALSE;
             $this->viewHelperNodesWhichDisableTheInterceptor[] = $node;
         }
     } elseif ($interceptorPosition === Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER) {
         if (end($this->viewHelperNodesWhichDisableTheInterceptor) === $node) {
             array_pop($this->viewHelperNodesWhichDisableTheInterceptor);
             if (count($this->viewHelperNodesWhichDisableTheInterceptor) === 0) {
                 $this->interceptorEnabled = TRUE;
             }
         }
     } elseif ($this->interceptorEnabled && $node instanceof Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode) {
         $node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', $this->objectManager->create('Tx_Fluid_ViewHelpers_EscapeViewHelper'), array('value' => $node));
     }
     return $node;
 }
Example #9
0
 /**
  * Create and set a validator chain
  *
  * @param array Object names of the validators
  * @return Tx_Extbase_MVC_Controller_Argument Returns $this (used for fluent interface)
  * @api
  */
 public function setNewValidatorConjunction(array $objectNames)
 {
     if ($this->validator === NULL) {
         $this->validator = $this->objectManager->create('Tx_Extbase_Validation_Validator_ConjunctionValidator');
     }
     foreach ($objectNames as $objectName) {
         if (!class_exists($objectName)) {
             $objectName = 'Tx_Extbase_Validation_Validator_' . $objectName;
         }
         $this->validator->addValidator($this->objectManager->get($objectName));
     }
     return $this;
 }
 /**
  * Maps arguments delivered by the request object to the local controller arguments.
  *
  * @return void
  */
 protected function mapRequestArgumentsToControllerArguments()
 {
     $optionalPropertyNames = array();
     $allPropertyNames = $this->arguments->getArgumentNames();
     foreach ($allPropertyNames as $propertyName) {
         if ($this->arguments[$propertyName]->isRequired() === FALSE) {
             $optionalPropertyNames[] = $propertyName;
         }
     }
     $validator = $this->objectManager->create('Tx_Extbase_MVC_Controller_ArgumentsValidator');
     $this->propertyMapper->mapAndValidate($allPropertyNames, $this->request->getArguments(), $this->arguments, $optionalPropertyNames, $validator);
     $this->argumentsMappingResults = $this->propertyMapper->getMappingResults();
 }
 /**
  * Sends the response
  *
  * @param array $results The collected results from the transaction requests
  * @param Tx_Newsletter_MVC_ExtDirect_Request $extDirectRequest
  * @return void
  * @author Robert Lemke <*****@*****.**>
  */
 protected function sendResponse(array $results, Tx_Newsletter_MVC_ExtDirect_Request $extDirectRequest)
 {
     $response = $this->objectManager->create('Tx_Extbase_MVC_Web_Response');
     $jsonResponse = json_encode(count($results) === 1 ? $results[0] : $results);
     if ($extDirectRequest->isFormPost() && $extDirectRequest->isFileUpload()) {
         $response->setHeader('Content-Type', 'text/html');
         $response->setContent('<html><body><textarea>' . $jsonResponse . '</textarea></body></html>');
     } else {
         $response->setHeader('Content-Type', 'application/json');
         $response->setContent($jsonResponse);
     }
     return $response;
 }
Example #12
0
 /**
  * Returns a sample blog populated with generic data
  * It is also an example how to handle objects and repositories in general
  *
  * @param integer $blogNumber
  * @return Tx_BlogExample_Domain_Model_Blog
  */
 public function createBlog($blogNumber = 1)
 {
     // initialize blog
     $blog = $this->objectManager->create('Tx_BlogExample_Domain_Model_Blog');
     $blog->setTitle('Blog #' . $blogNumber);
     $blog->setDescription('A blog about TYPO3 extension development.');
     // create author
     $author = $this->objectManager->create('Tx_BlogExample_Domain_Model_Person', 'Stephen', 'Smith', '*****@*****.**');
     // create administrator
     $administrator = $this->objectManager->create('Tx_BlogExample_Domain_Model_Administrator');
     $administrator->setName('John Doe');
     $administrator->setEmail('*****@*****.**');
     $blog->setAdministrator($administrator);
     // create sample posts
     for ($postNumber = 1; $postNumber < 6; $postNumber++) {
         // create post
         $post = $this->objectManager->create('Tx_BlogExample_Domain_Model_Post');
         $post->setTitle('The ' . $postNumber . '. post of blog #' . $blogNumber);
         $post->setAuthor($author);
         $post->setContent('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
         // create comments
         $comment = $this->objectManager->create('Tx_BlogExample_Domain_Model_Comment');
         $comment->setDate(new DateTime());
         $comment->setAuthor('Peter Pan');
         $comment->setEmail('*****@*****.**');
         $comment->setContent('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.');
         $post->addComment($comment);
         $comment = $this->objectManager->create('Tx_BlogExample_Domain_Model_Comment');
         $comment->setDate(new DateTime('2009-03-19 23:44'));
         $comment->setAuthor('John Smith');
         $comment->setEmail('*****@*****.**');
         $comment->setContent('Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.');
         $post->addComment($comment);
         // create some random tags
         if (rand(0, 1) > 0) {
             $tag = $this->objectManager->create('Tx_BlogExample_Domain_Model_Tag', 'MVC');
             $post->addTag($tag);
         }
         if (rand(0, 1) > 0) {
             $tag = $this->objectManager->create('Tx_BlogExample_Domain_Model_Tag', 'Domain Driven Design');
             $post->addTag($tag);
         }
         if (rand(0, 1) > 0) {
             $tag = $this->objectManager->create('Tx_BlogExample_Domain_Model_Tag', 'TYPO3');
             $post->addTag($tag);
         }
         // add the post to the current blog
         $blog->addPost($post);
         $post->setBlog($blog);
     }
     return $blog;
 }
 /**
  * Builds a Json Ext Direct request by reading the transaction data from
  * standard input.
  *
  * @return Tx_Newsletter_MVC_ExtDirect_Request The Ext Direct request object
  * @throws Exception
  * @author Christopher Hlubek <*****@*****.**>
  * @author Robert Lemke <*****@*****.**>
  */
 protected function buildJsonRequest()
 {
     $transactionDatas = file_get_contents("php://input");
     if (($transactionDatas = json_decode($transactionDatas)) === NULL) {
         throw new Exception('The request is not a valid Ext Direct request', 1268490738);
     }
     if (!is_array($transactionDatas)) {
         $transactionDatas = array($transactionDatas);
     }
     $request = $this->objectManager->create('Tx_Newsletter_MVC_ExtDirect_Request');
     foreach ($transactionDatas as $transactionData) {
         $request->createAndAddTransaction($transactionData->action, $transactionData->method, is_array($transactionData->data) ? $transactionData->data : array(), $transactionData->tid);
     }
     return $request;
 }
 /**
  * Initiate a sub request to $this->controller. Make sure to fill $this->controller
  * via Dependency Injection.
  *
  * @return Tx_Extbase_MVC_Response the response of this request.
  * @api
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 protected function initiateSubRequest()
 {
     if (!$this->controller instanceof Tx_Fluid_Core_Widget_AbstractWidgetController) {
         if (isset($this->controller)) {
             throw new Tx_Fluid_Core_Widget_Exception_MissingControllerException('initiateSubRequest() can not be called if there is no valid controller extending Tx_Fluid_Core_Widget_AbstractWidgetController. Got "' . get_class($this->controller) . '" in class "' . get_class($this) . '".', 1289422564);
         }
         throw new Tx_Fluid_Core_Widget_Exception_MissingControllerException('initiateSubRequest() can not be called if there is no controller inside $this->controller. Make sure to add a corresponding injectController method to your WidgetViewHelper class "' . get_class($this) . '".', 1284401632);
     }
     $subRequest = $this->objectManager->create('Tx_Fluid_Core_Widget_WidgetRequest');
     $subRequest->setWidgetContext($this->widgetContext);
     $this->passArgumentsToSubRequest($subRequest);
     $subResponse = $this->objectManager->create('Tx_Extbase_MVC_Web_Response');
     $this->controller->processRequest($subRequest, $subResponse);
     return $subResponse;
 }
Example #15
0
 /**
  * Fetches a collection of objects related to a property of a parent object
  *
  * @param Tx_Extbase_DomainObject_DomainObjectInterface $parentObject The object instance this proxy is part of
  * @param string $propertyName The name of the proxied property in it's parent
  * @param mixed $fieldValue The raw field value.
  * @param bool $enableLazyLoading A flag indication if the related objects should be lazy loaded
  * @param bool $performLanguageOverlay A flag indication if the related objects should be localized
  * @return Tx_Extbase_Persistence_LazyObjectStorage|Tx_Extbase_Persistence_QueryResultInterface The result
  */
 public function fetchRelated(Tx_Extbase_DomainObject_DomainObjectInterface $parentObject, $propertyName, $fieldValue = '', $enableLazyLoading = TRUE)
 {
     $columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
     $propertyMetaData = $this->reflectionService->getClassSchema(get_class($parentObject))->getProperty($propertyName);
     if ($enableLazyLoading === TRUE && $propertyMetaData['lazy']) {
         if ($propertyMetaData['type'] === 'Tx_Extbase_Persistence_ObjectStorage') {
             $result = $this->objectManager->create('Tx_Extbase_Persistence_LazyObjectStorage', $parentObject, $propertyName, $fieldValue);
         } else {
             if (empty($fieldValue)) {
                 $result = NULL;
             } else {
                 $result = $this->objectManager->create('Tx_Extbase_Persistence_LazyLoadingProxy', $parentObject, $propertyName, $fieldValue);
             }
         }
     } else {
         $result = $this->fetchRelatedEager($parentObject, $propertyName, $fieldValue);
     }
     return $result;
 }
 /**
  * Builds a web request object from the raw HTTP information and the configuration
  *
  * @return Tx_Extbase_MVC_Web_Request The web request as an object
  */
 public function build()
 {
     $this->loadDefaultValues();
     $pluginNamespace = Tx_Extbase_Utility_Extension::getPluginNamespace($this->extensionName, $this->pluginName);
     $parameters = t3lib_div::_GPmerged($pluginNamespace);
     if (is_string($parameters['controller']) && array_key_exists($parameters['controller'], $this->allowedControllerActions)) {
         $controllerName = filter_var($parameters['controller'], FILTER_SANITIZE_STRING);
     } elseif (!empty($this->defaultControllerName)) {
         $controllerName = $this->defaultControllerName;
     } else {
         throw new Tx_Extbase_MVC_Exception('The default controller can not be determined.<br />' . 'Please check for Tx_Extbase_Utility_Extension::configurePlugin() in your ext_localconf.php.', 1295479650);
     }
     $allowedActions = $this->allowedControllerActions[$controllerName];
     if (is_string($parameters['action']) && is_array($allowedActions) && in_array($parameters['action'], $allowedActions)) {
         $actionName = filter_var($parameters['action'], FILTER_SANITIZE_STRING);
     } elseif (!empty($this->defaultActionName)) {
         $actionName = $this->defaultActionName;
     } else {
         throw new Tx_Extbase_MVC_Exception('The default action can not be determined for controller "' . $controllerName . '".<br />' . 'Please check Tx_Extbase_Utility_Extension::configurePlugin() in your ext_localconf.php.', 1295479651);
     }
     $request = $this->objectManager->create('Tx_Extbase_MVC_Web_Request');
     $request->setPluginName($this->pluginName);
     $request->setControllerExtensionName($this->extensionName);
     $request->setControllerName($controllerName);
     $request->setControllerActionName($actionName);
     $request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
     $request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
     $request->setMethod(isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : NULL);
     if (is_string($parameters['format']) && strlen($parameters['format'])) {
         $request->setFormat(filter_var($parameters['format'], FILTER_SANITIZE_STRING));
     }
     foreach ($parameters as $argumentName => $argumentValue) {
         $request->setArgument($argumentName, $argumentValue);
     }
     return $request;
 }
Example #17
0
 /**
  * Inflates a "meta-information-plus-simple-array" up to the configured type of ArrayObject instance. Also inflates all
  * nested, deflated configurations up into members on the ArrayObject instance, using the appropriate inflation method.
  *
  * @param array $metaConfigurationAndDeflatedValue
  * @param array $encounteredClassesIndexedBySplHash A cumulative array of encountered objects indexed by SPL hash
  * @return ArrayObject
  */
 protected function inflateArrayObject(array $metaConfigurationAndDeflatedValue, array &$encounteredClassesIndexedBySplHash)
 {
     $className = $metaConfigurationAndDeflatedValue['class'];
     if (TRUE === isset($this->rewrites[$className])) {
         $className = $this->rewrites[$className];
     }
     if (is_string($metaConfigurationAndDeflatedValue['value']) === TRUE) {
         $possibleHash = $metaConfigurationAndDeflatedValue['value'];
         if (isset($encounteredClassesIndexedBySplHash[$possibleHash]) === TRUE) {
             return $encounteredClassesIndexedBySplHash[$possibleHash];
         }
         return NULL;
     }
     $instance = $this->objectManager->create($className);
     foreach ($metaConfigurationAndDeflatedValue['value'] as $index => $memberMetaConfigurationAndDeflatedValue) {
         $inflatedMember = $this->inflatePropertyValue($memberMetaConfigurationAndDeflatedValue, $encounteredClassesIndexedBySplHash);
         if ($instance instanceof Tx_Extbase_Persistence_ObjectStorage) {
             $instance->attach($inflatedMember);
         } elseif ($instance instanceof ArrayAccess || is_array($instance) === TRUE) {
             $instance[$index] = $inflatedMember;
         }
     }
     return $instance;
 }
 /**
  * @param Tx_Extbase_Object_ObjectManagerInterface $objectManager
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function injectObjectManager(Tx_Extbase_Object_ObjectManagerInterface $objectManager)
 {
     $this->objectManager = $objectManager;
     $this->templateVariableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer');
     $this->viewHelperVariableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
 }
 /**
  * Evaluates to the value of a bind variable.
  *
  * @param string $bindVariableName the bind variable name; non-null
  * @return Tx_Extbase_Persistence_QOM_BindVariableValueInterface the operand; non-null
  * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
  */
 public function bindVariable($bindVariableName)
 {
     return $this->objectManager->create('Tx_Extbase_Persistence_QOM_BindVariableValue', $bindVariableName);
 }
 /**
  * Build a response for dispatching this Ext Direct transaction
  *
  * @return Tx_Newsletter_ExtDirect_TransactionResponse A response for dispatching this transaction
  * @author Christopher Hlubek <*****@*****.**>
  */
 public function buildResponse()
 {
     return $this->objectManager->create('Tx_Newsletter_MVC_ExtDirect_TransactionResponse');
 }
 /**
  * @param Tx_Contentstage_Domain_Model_Review 	$review the review to take the records from
  * @param string $table The table to query (CAN ONLY BE A SINGLE TABLE!).
  * @param string $fields The fields to get (* by default).
  * @param string $where The where condition (empty by default).
  * @param string $groupBy Group the query IMPORTANT: not used in this version.
  * @param string $orderBy Order to use on the query (uid ASC by default).
  * @param string $limit Limit the query.
  * @param string $idFields The ID fields of the table.
  * @return Tx_Contentstage_Domain_Repository_Result The result object.
  */
 public function findReviewRecords(Tx_Contentstage_Domain_Model_Review $review, $table, $fields = '*', $where = '', $groupBy = '', $orderBy = 'uid ASC', $limit = '')
 {
     list($actualTable) = t3lib_div::trimExplode(' ', $table);
     // this is only needed in this scope but could be calculated hundreds of times, so static makes sense here
     static $tables;
     if (empty($tables) && !is_array($tables)) {
         foreach ($review->getDbrecord() as $dbrecord) {
             $dbecordTables[$dbrecord->getTablename()] = true;
         }
         // assign at the end
         $tables = $dbecordTables;
     }
     if (!isset($tables[$actualTable]) && !isset($tables[$table]) || substr($table, -3) !== '_mm' && !$this->tcaObject->isValidTca($table)) {
         $result = $this->objectManager->create('Tx_Contentstage_Domain_Repository_EmptyResult');
         $result->setRepository($this);
         $result->setTable($table);
         return $result;
     }
     $result = $this->objectManager->create('Tx_Contentstage_Domain_Repository_Result');
     $result->setRepository($this);
     $result->setTable($table);
     $uids = array();
     foreach ($review->getDbrecord() as $record) {
         $uids[] = $record->getRecorduid();
     }
     if (empty($uids)) {
         $whereParts = array('1 <> 1');
     } else {
         $whereParts = array('uid IN (' . implode(',', $uids) . ')');
     }
     if (!empty($where)) {
         $whereParts[] = '(' . $where . ')';
     }
     $query = $this->db->SELECTquery($fields, $table, implode(' AND ', $whereParts), $groupBy, $orderBy, $limit);
     // this slows the process down imensely!
     //$this->log->log($query, Tx_CabagExtbase_Utility_Logging::INFORMATION);
     $resource = $this->db->sql_query($query);
     if (!$resource || $this->db->sql_error()) {
         throw new Exception($this->db->sql_error() . ' [Query: ' . $this->db->SELECTquery($fields, $table, implode(' AND ', $whereParts), $groupBy, $orderBy, $limit) . ']', self::ERROR_GET);
     }
     $result->setResource($resource);
     $result->setQuery($query);
     return $result;
 }
Example #22
0
 /**
  * Creates an Ext Direct Transaction and adds it to the request instance.
  *
  * @param string $action The "action" – the "controller object name" in FLOW3 terms
  * @param string $method The "method" – the "action name" in FLOW3 terms
  * @param array $data Numeric array of arguments which are eventually passed to the FLOW3 action method
  * @param mixed $tid The ExtDirect transaction id
  * @return void
  */
 public function createAndAddTransaction($action, $method, array $data, $tid)
 {
     $transaction = $this->objectManager->create('Tx_Newsletter_MVC_ExtDirect_Transaction', $this, $action, $method, $data, $tid);
     $this->transactions[] = $transaction;
 }
 /**
  * Text node handler
  *
  * @param Tx_Fluid_Core_Parser_ParsingState $state
  * @param string $text
  * @return void
  * @author Sebastian Kurfürst <*****@*****.**>
  * @author Karsten Dambekalns <*****@*****.**>
  */
 protected function textHandler(Tx_Fluid_Core_Parser_ParsingState $state, $text)
 {
     $node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', $text);
     $this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_TEXT);
     $state->getNodeFromStack()->addChildNode($node);
 }