[Form] Fixed documentation, and the DateType (default options)
This commit is contained in:
parent
05842c54b8
commit
779d3bbb8e
@ -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 = array_merge($this->getDefaultOptions(), $options);
|
||||
|
||||
$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