Skip to content

Commit

Permalink
[Form] Fixed documentation, and the DateType (default options)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Apr 11, 2012
1 parent 44fcf61 commit 4ffa08c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
4 changes: 0 additions & 4 deletions AbstractTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Extension/Core/Type/DateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = array_merge($this->getDefaultOptions(), $options);

$format = $defaultOptions['format'];
$pattern = $options['format'];
Expand Down
4 changes: 0 additions & 4 deletions FormTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4ffa08c

Please sign in to comment.