예제 #1
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $writer->write(' type="' . $component->getType() . '"');
     $writer->write(' value="' . $this->getValue($context, $component) . '"');
 }
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $type = $component->getType();
     $disabled = $component->getDisabled();
     $checked = $this->getValue($context, $component);
     if ($type !== 'radio') {
         $type = 'checkbox';
     }
     $writer->write(' type="' . $type . '"');
     $writer->write(' value="true"');
     if ($checked === true) {
         $writer->write(' checked="checked"');
     }
 }
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $rows = $component->getRows();
     $cols = $component->getCols();
     $value = $this->getValue($context, $component);
     if ($rows != null) {
         $writer->write(' rows="' . $rows . '"');
     } else {
         $writer->write(' rows="3"');
     }
     if ($cols != null) {
         $writer->write(' cols="' . $cols . '"');
     } else {
         $writer->write(' cols="20"');
     }
     $writer->write('>');
     if ($value !== null) {
         $writer->write($value);
     }
     $writer->write('</textarea>');
 }