Skip to content

Commit

Permalink
TASK: Apply migration Neos.Flow-20161124204700
Browse files Browse the repository at this point in the history
Adjusts code to package renaming from "TYPO3.Flow" to "Neos.Flow"
  • Loading branch information
skurfuerst committed Nov 24, 2016
1 parent 7c475e6 commit 6dd54e1
Show file tree
Hide file tree
Showing 64 changed files with 295 additions and 341 deletions.
2 changes: 1 addition & 1 deletion Classes/TYPO3/Form/Core/Model/AbstractFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function parseOption($optionName)
}
$formRuntime = $this->finisherContext->getFormRuntime();
return preg_replace_callback('/{([^}]+)}/', function ($match) use ($formRuntime) {
return \TYPO3\Flow\Reflection\ObjectAccess::getPropertyPath($formRuntime, $match[1]);
return \Neos\Flow\Reflection\ObjectAccess::getPropertyPath($formRuntime, $match[1]);
}, $option);
}
}
4 changes: 2 additions & 2 deletions Classes/TYPO3/Form/Core/Model/AbstractFormElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* A base form element, which is the starting point for creating custom (PHP-based)
Expand Down Expand Up @@ -108,7 +108,7 @@ public function setDefaultValue($defaultValue)
public function isRequired()
{
foreach ($this->getValidators() as $validator) {
if ($validator instanceof \TYPO3\Flow\Validation\Validator\NotEmptyValidator) {
if ($validator instanceof \Neos\Flow\Validation\Validator\NotEmptyValidator) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/TYPO3/Form/Core/Model/AbstractSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* A base class for "section-like" form parts like "Page" or "Section" (which
Expand Down
16 changes: 8 additions & 8 deletions Classes/TYPO3/Form/Core/Model/FormDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* This class encapsulates a complete *Form Definition*, with all of its pages,
Expand Down Expand Up @@ -216,7 +216,7 @@
* ==========================
*
* In order to trigger *rendering* on a FormDefinition,
* the current {@link \TYPO3\Flow\Mvc\ActionRequest} needs to be bound to the FormDefinition,
* the current {@link \Neos\Flow\Mvc\ActionRequest} needs to be bound to the FormDefinition,
* resulting in a {@link \TYPO3\Form\Core\Runtime\FormRuntime} object which contains the *Runtime State* of the form
* (such as the currently inserted values).
*
Expand Down Expand Up @@ -477,7 +477,7 @@ public function createFinisher($finisherIdentifier, array $options = array())
$implementationClassName = $this->finisherPresets[$finisherIdentifier]['implementationClassName'];
$defaultOptions = isset($this->finisherPresets[$finisherIdentifier]['options']) ? $this->finisherPresets[$finisherIdentifier]['options'] : array();

$options = \TYPO3\Flow\Utility\Arrays::arrayMergeRecursiveOverrule($defaultOptions, $options);
$options = \Neos\Flow\Utility\Arrays::arrayMergeRecursiveOverrule($defaultOptions, $options);

$finisher = new $implementationClassName;
$finisher->setOptions($options);
Expand Down Expand Up @@ -555,7 +555,7 @@ public function getElementByIdentifier($elementIdentifier)
*/
public function addElementDefaultValue($elementIdentifier, $defaultValue)
{
$this->elementDefaultValues = \TYPO3\Flow\Utility\Arrays::setValueByPath($this->elementDefaultValues, $elementIdentifier, $defaultValue);
$this->elementDefaultValues = \Neos\Flow\Utility\Arrays::setValueByPath($this->elementDefaultValues, $elementIdentifier, $defaultValue);
}

/**
Expand All @@ -568,7 +568,7 @@ public function addElementDefaultValue($elementIdentifier, $defaultValue)
*/
public function getElementDefaultValueByIdentifier($elementIdentifier)
{
return \TYPO3\Flow\Reflection\ObjectAccess::getPropertyPath($this->elementDefaultValues, $elementIdentifier);
return \Neos\Flow\Reflection\ObjectAccess::getPropertyPath($this->elementDefaultValues, $elementIdentifier);
}

/**
Expand Down Expand Up @@ -613,12 +613,12 @@ public function removePage(Page $pageToRemove)
* Bind the current request & response to this form instance, effectively creating
* a new "instance" of the Form.
*
* @param \TYPO3\Flow\Mvc\ActionRequest $request
* @param \TYPO3\Flow\Http\Response $response
* @param \Neos\Flow\Mvc\ActionRequest $request
* @param \Neos\Flow\Http\Response $response
* @return \TYPO3\Form\Core\Runtime\FormRuntime
* @api
*/
public function bind(\TYPO3\Flow\Mvc\ActionRequest $request, \TYPO3\Flow\Http\Response $response)
public function bind(\Neos\Flow\Mvc\ActionRequest $request, \Neos\Flow\Http\Response $response)
{
return new \TYPO3\Form\Core\Runtime\FormRuntime($this, $request, $response);
}
Expand Down
6 changes: 3 additions & 3 deletions Classes/TYPO3/Form/Core/Model/FormElementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ public function setRenderingOption($key, $value);
/**
* Returns the child validators of the ConjunctionValidator that is registered for this element
*
* @return \SplObjectStorage<\TYPO3\Flow\Validation\Validator\ValidatorInterface>
* @return \SplObjectStorage<\Neos\Flow\Validation\Validator\ValidatorInterface>
* @internal
*/
public function getValidators();

/**
* Registers a validator for this element
*
* @param \TYPO3\Flow\Validation\Validator\ValidatorInterface $validator
* @param \Neos\Flow\Validation\Validator\ValidatorInterface $validator
* @return void
* @api
*/
public function addValidator(\TYPO3\Flow\Validation\Validator\ValidatorInterface $validator);
public function addValidator(\Neos\Flow\Validation\Validator\ValidatorInterface $validator);

/**
* Set the target data type for this element
Expand Down
2 changes: 1 addition & 1 deletion Classes/TYPO3/Form/Core/Model/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* A Page, being part of a bigger FormDefinition. It contains numerous FormElements
Expand Down
24 changes: 12 additions & 12 deletions Classes/TYPO3/Form/Core/Model/ProcessingRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* A processing Rule contains information for property mapping and validation.
Expand All @@ -29,24 +29,24 @@ class ProcessingRule

/**
* @Flow\Inject
* @var \TYPO3\Flow\Property\PropertyMappingConfiguration
* @var \Neos\Flow\Property\PropertyMappingConfiguration
*/
protected $propertyMappingConfiguration;

/**
* @Flow\Inject
* @var \TYPO3\Flow\Validation\Validator\ConjunctionValidator
* @var \Neos\Flow\Validation\Validator\ConjunctionValidator
*/
protected $validator;

/**
* @var \TYPO3\Flow\Error\Result
* @var \Neos\Flow\Error\Result
*/
protected $processingMessages;

/**
* @Flow\Inject
* @var \TYPO3\Flow\Property\PropertyMapper
* @var \Neos\Flow\Property\PropertyMapper
* @internal
*/
protected $propertyMapper;
Expand All @@ -56,11 +56,11 @@ class ProcessingRule
*/
public function __construct()
{
$this->processingMessages = new \TYPO3\Flow\Error\Result();
$this->processingMessages = new \Neos\Flow\Error\Result();
}

/**
* @return \TYPO3\Flow\Property\PropertyMappingConfiguration
* @return \Neos\Flow\Property\PropertyMappingConfiguration
*/
public function getPropertyMappingConfiguration()
{
Expand All @@ -86,7 +86,7 @@ public function setDataType($dataType)
/**
* Returns the child validators of the ConjunctionValidator that is bound to this processing rule
*
* @return \SplObjectStorage<\TYPO3\Flow\Validation\Validator\ValidatorInterface>
* @return \SplObjectStorage<\Neos\Flow\Validation\Validator\ValidatorInterface>
* @internal
*/
public function getValidators()
Expand All @@ -95,10 +95,10 @@ public function getValidators()
}

/**
* @param \TYPO3\Flow\Validation\Validator\ValidatorInterface $validator
* @param \Neos\Flow\Validation\Validator\ValidatorInterface $validator
* @return void
*/
public function addValidator(\TYPO3\Flow\Validation\Validator\ValidatorInterface $validator)
public function addValidator(\Neos\Flow\Validation\Validator\ValidatorInterface $validator)
{
$this->validator->addValidator($validator);
}
Expand All @@ -113,7 +113,7 @@ public function process($value)
$value = $this->propertyMapper->convert($value, $this->dataType, $this->propertyMappingConfiguration);
$messages = $this->propertyMapper->getMessages();
} else {
$messages = new \TYPO3\Flow\Error\Result();
$messages = new \Neos\Flow\Error\Result();
}

$validationResult = $this->validator->validate($value);
Expand All @@ -124,7 +124,7 @@ public function process($value)
}

/**
* @return \TYPO3\Flow\Error\Result
* @return \Neos\Flow\Error\Result
*/
public function getProcessingMessages()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function createValidator($validatorIdentifier, array $options = array())
$implementationClassName = $validatorPresets[$validatorIdentifier]['implementationClassName'];
$defaultOptions = isset($validatorPresets[$validatorIdentifier]['options']) ? $validatorPresets[$validatorIdentifier]['options'] : array();

$options = \TYPO3\Flow\Utility\Arrays::arrayMergeRecursiveOverrule($defaultOptions, $options);
$options = \Neos\Flow\Utility\Arrays::arrayMergeRecursiveOverrule($defaultOptions, $options);

$validator = new $implementationClassName($options);
$this->addValidator($validator);
Expand All @@ -167,10 +167,10 @@ public function createValidator($validatorIdentifier, array $options = array())
/**
* Add a validator to the element
*
* @param \TYPO3\Flow\Validation\Validator\ValidatorInterface $validator
* @param \Neos\Flow\Validation\Validator\ValidatorInterface $validator
* @return void
*/
public function addValidator(\TYPO3\Flow\Validation\Validator\ValidatorInterface $validator)
public function addValidator(\Neos\Flow\Validation\Validator\ValidatorInterface $validator)
{
$formDefinition = $this->getRootForm();
$formDefinition->getProcessingRule($this->getIdentifier())->addValidator($validator);
Expand Down
2 changes: 1 addition & 1 deletion Classes/TYPO3/Form/Core/Model/UnknownFormElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;
use TYPO3\Form\Core\Renderer\UnknownFormElementRenderer;
use TYPO3\Form\Core\Runtime\FormRuntime;
use TYPO3\Form\Exception\IdentifierNotValidException;
Expand Down
6 changes: 3 additions & 3 deletions Classes/TYPO3/Form/Core/Renderer/AbstractElementRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class AbstractElementRenderer implements RendererInterface
/**
* The assigned controller context which might be needed by the renderer.
*
* @var \TYPO3\Flow\Mvc\Controller\ControllerContext
* @var \Neos\Flow\Mvc\Controller\ControllerContext
* @api
*/
protected $controllerContext;
Expand All @@ -35,10 +35,10 @@ abstract class AbstractElementRenderer implements RendererInterface
/**
* Set the controller context which should be used
*
* @param \TYPO3\Flow\Mvc\Controller\ControllerContext $controllerContext
* @param \Neos\Flow\Mvc\Controller\ControllerContext $controllerContext
* @api
*/
public function setControllerContext(\TYPO3\Flow\Mvc\Controller\ControllerContext $controllerContext)
public function setControllerContext(\Neos\Flow\Mvc\Controller\ControllerContext $controllerContext)
{
$this->controllerContext = $controllerContext;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/TYPO3/Form/Core/Renderer/FluidFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Neos\FluidAdaptor\Core\ViewHelper\TemplateVariableContainer;
use Neos\FluidAdaptor\View\TemplatePaths;
use Neos\FluidAdaptor\View\TemplateView;
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* Default form renderer which used *Fluid Templates* to render *Renderables*.
Expand Down
4 changes: 2 additions & 2 deletions Classes/TYPO3/Form/Core/Renderer/RendererInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ interface RendererInterface
/**
* Set the controller context which should be used
*
* @param \TYPO3\Flow\Mvc\Controller\ControllerContext $controllerContext
* @param \Neos\Flow\Mvc\Controller\ControllerContext $controllerContext
* @api
*/
public function setControllerContext(\TYPO3\Flow\Mvc\Controller\ControllerContext $controllerContext);
public function setControllerContext(\Neos\Flow\Mvc\Controller\ControllerContext $controllerContext);

/**
* Render the passed $renderable and return the rendered Renderable.
Expand Down

0 comments on commit 6dd54e1

Please sign in to comment.