Permalink
Browse files

merged branch willdurand/fix-form-type-doc (PR #3880)

Commits
-------

6f56dfc [Form] Fixed DateType default options
779d3bb [Form] Fixed documentation, and the DateType (default options)

Discussion
----------

[Form] Fixed documentation, and the DateType (default options)

---------------------------------------------------------------------------

by fabpot at 2012-04-11T16:48:04Z

That breaks the tests.

---------------------------------------------------------------------------

by willdurand at 2012-04-11T16:50:35Z

I got an error with the Form test suite before to write this patch..

---------------------------------------------------------------------------

by willdurand at 2012-04-11T16:53:30Z

Nevermind, I can see broken tests.. I'm on, sorry

---------------------------------------------------------------------------

by willdurand at 2012-04-11T16:57:52Z

@fabpot fixed.

```
OK, but incomplete or skipped tests!
Tests: 945, Assertions: 1439, Incomplete: 11.
```
  • Loading branch information...
2 parents 61bec64 + 6f56dfc commit 570bb6ab6794fb9115229e108b40a347ea165a09 @fabpot fabpot committed Apr 11, 2012
@@ -92,8 +92,6 @@ public function createBuilder($name, FormFactoryInterface $factory, array $optio
/**
* Returns the default options for this type.
*
- * @param array $options
- *
* @return array The default options
*/
public function getDefaultOptions()
@@ -104,8 +102,6 @@ public function getDefaultOptions()
/**
* Returns the allowed option values for each option (if any).
*
- * @param array $options
- *
* @return array The allowed option values
*/
public function getAllowedOptionValues()
@@ -61,8 +61,6 @@ public function buildViewBottomUp(FormView $view, FormInterface $form)
/**
* Overrides the default options form the extended type.
*
- * @param array $options
- *
* @return array
*/
public function getDefaultOptions()
@@ -73,8 +71,6 @@ public function getDefaultOptions()
/**
* Returns the allowed option values for each option (if any).
*
- * @param array $options
- *
* @return array The allowed option values
*/
public function getAllowedOptionValues()
@@ -44,7 +44,7 @@ public function buildForm(FormBuilder $builder, array $options)
// If $format is not in the allowed options, it's considered as the pattern of the formatter if it is a string
if (!in_array($format, $allowedFormatOptionValues, true)) {
if (is_string($format)) {
- $defaultOptions = $this->getDefaultOptions($options);
+ $defaultOptions = $this->getDefaultOptions();
$format = $defaultOptions['format'];
$pattern = $options['format'];
@@ -75,17 +75,13 @@ function createBuilder($name, FormFactoryInterface $factory, array $options);
/**
* Returns the default options for this type.
*
- * @param array $options
- *
* @return array The default options
*/
function getDefaultOptions();
/**
* Returns the allowed option values for each option (if any).
*
- * @param array $options
- *
* @return array The allowed option values
*/
function getAllowedOptionValues();

0 comments on commit 570bb6a

Please sign in to comment.