sfWidgetFormSchemaForEach.class.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * sfWidgetFormSchemaForEach duplicates a given widget multiple times in a widget schema.
  11. *
  12. * @package symfony
  13. * @subpackage widget
  14. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  15. * @version SVN: $Id: sfWidgetFormSchemaForEach.class.php 9046 2008-05-19 08:13:51Z FabianLange $
  16. */
  17. class sfWidgetFormSchemaForEach extends sfWidgetFormSchema
  18. {
  19. /**
  20. * Constructor.
  21. *
  22. * @param sfWidgetFormSchema $widget An sfWidgetFormSchema instance
  23. * @param integer $count The number of times to duplicate the widget
  24. * @param array $options An array of options
  25. * @param array $attributes An array of default HTML attributes
  26. * @param array $labels An array of HTML labels
  27. *
  28. * @see sfWidgetFormSchema
  29. */
  30. public function __construct(sfWidgetFormSchema $widget, $count, $options = array(), $attributes = array(), $labels = array())
  31. {
  32. parent::__construct(array_fill(0, $count, $widget), $options, $attributes, $labels);
  33. }
  34. }