From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- library/vendor/Zend/Form/Decorator/DtDdWrapper.php | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 library/vendor/Zend/Form/Decorator/DtDdWrapper.php (limited to 'library/vendor/Zend/Form/Decorator/DtDdWrapper.php') diff --git a/library/vendor/Zend/Form/Decorator/DtDdWrapper.php b/library/vendor/Zend/Form/Decorator/DtDdWrapper.php new file mode 100644 index 0000000..b569fab --- /dev/null +++ b/library/vendor/Zend/Form/Decorator/DtDdWrapper.php @@ -0,0 +1,69 @@ + item, and wraps the content in a
. Used as a + * default decorator for subforms and display groups. + * + * @category Zend + * @package Zend_Form + * @subpackage Decorator + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +class Zend_Form_Decorator_DtDdWrapper extends Zend_Form_Decorator_Abstract +{ + /** + * Default placement: surround content + * @var string + */ + protected $_placement = null; + + /** + * Render + * + * Renders as the following: + *
$dtLabel
+ *
$content
+ * + * $dtLabel can be set via 'dtLabel' option, defaults to '\ ' + * + * @param string $content + * @return string + */ + public function render($content) + { + $elementName = $this->getElement()->getName(); + + $dtLabel = $this->getOption('dtLabel'); + if( null === $dtLabel ) { + $dtLabel = ' '; + } + + return '
' . $dtLabel . '
' . + '
' . $content . '
'; + } +} -- cgit v1.2.3