merged branch willdurand/fix-form-type-doc (PR #3880)
Commits -------6f56dfc
[Form] Fixed DateType default options779d3bb
[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. ```
This commit is contained in:
commit
570bb6ab67
@ -92,8 +92,6 @@ abstract class AbstractType implements FormTypeInterface
|
||||
/**
|
||||
* Returns the default options for this type.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return array The default options
|
||||
*/
|
||||
public function getDefaultOptions()
|
||||
@ -104,8 +102,6 @@ abstract class AbstractType implements FormTypeInterface
|
||||
/**
|
||||
* 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 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface
|
||||
/**
|
||||
* Overrides the default options form the extended type.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDefaultOptions()
|
||||
@ -73,8 +71,6 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface
|
||||
/**
|
||||
* 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 @@ class DateType extends AbstractType
|
||||
// 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,8 +75,6 @@ interface FormTypeInterface
|
||||
/**
|
||||
* Returns the default options for this type.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return array The default options
|
||||
*/
|
||||
function getDefaultOptions();
|
||||
@ -84,8 +82,6 @@ interface FormTypeInterface
|
||||
/**
|
||||
* Returns the allowed option values for each option (if any).
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return array The allowed option values
|
||||
*/
|
||||
function getAllowedOptionValues();
|
||||
|
Reference in New Issue
Block a user