Source of file InputSubmit.php
Size: 1,093 Bytes - Last Modified: 2015-12-22T09:42:40-05:00
../src/View/Helper/InputSubmit.php
123456789101112131415161718192021222324252627282930313233343536
Covered by 1 test(s):
37
Covered by 1 test(s):
38
Covered by 1 test(s):
3940
Covered by 1 test(s):
4142
Covered by 1 test(s):
4344
Covered by 1 test(s):
45
Covered by 1 test(s):
46
Covered by 1 test(s):
474849
| <?php /** * Submit Input View Helper * * @category PHP * @package MvcLite * @subpackage View\Helper * @since File available since release 1.1.x * @author Cory Collier <corycollier@corycollier.com> */ namespace MvcLite\View\Helper; use MvcLite\View\Helper\InputElementAbstract as InputElementAbstract; /** * Submit Input View Helper class * * @category PHP * @package MvcLite * @subpackage View\Helper * @since Class available since release 1.1.x * @author Cory Collier <corycollier@corycollier.com> */ class InputSubmit extends InputElementAbstract { /** * renders a submit element * * @param array $attribs * @return string */ public function render($attribs = []) { $defaults = [ 'value' => 'Submit', 'class' => 'btn btn-default', ]; $attribs = array_merge($defaults, $attribs); $template = '<input type="submit"!attribs>'; return strtr($template, [ '!attribs' => $this->getHtmlAttribs($attribs), ]); } } |