protected function preRender()
 {
     $id = property($this->props, 'id');
     if ($id) {
         $this->props->containerId = $this->props->id . 'Container';
     }
     parent::preRender();
 }
 protected function preRender()
 {
     if (exists($this->props->icon)) {
         $this->addClass('with-icon');
     }
     if (!str_contains($this->props->class, 'btn-')) {
         $this->addClass('btn-default');
     }
     parent::preRender();
 }
 protected function preRender()
 {
     $prop = $this->props;
     // Output a hidden checkbox that will submit an empty value if the visible checkbox is not checked.
     // Does not apply to checkboxes of array fields.
     if (exists($prop->name) && !str_endsWith($prop->name, '[]')) {
         echo "<input type=checkbox name=\"{$prop->name}\" value=\"\" checked style=\"display:none\">";
     }
     $id = property($prop, 'id');
     if ($id) {
         $prop->containerId = $prop->id . 'Container';
     }
     echo "<!--CHECKBOX-->";
     parent::preRender();
 }
 protected function preRender()
 {
     $prop = $this->props;
     if (!isset($prop->width) || !isset($prop->height)) {
         $this->containerTag = 'img';
     }
     if (isset($prop->value)) {
         parent::preRender();
     }
 }
 protected function preRender()
 {
     $this->props->containerId = $this->props->id . 'Container';
     parent::preRender();
 }
 protected function preRender()
 {
     $props = $this->props;
     $assets = $this->context->getAssetsService();
     // Non-native selects are implemented with the Chosen javascript widget.
     if (!$props->native) {
         $this->addClass('chosen-select');
     }
     parent::preRender();
 }
 protected function preRender()
 {
     $this->cssClassName = $this->props->fieldClass;
     parent::preRender();
 }
 protected function preRender()
 {
     $prop = $this->props;
     $type = $prop->get('type', 'text');
     switch ($type) {
         case 'multiline':
             $this->containerTag = 'textarea';
             break;
         case 'color':
             $this->containerTag = 'div';
             $this->addClass('input-group');
             break;
         default:
             $this->containerTag = 'input';
             $this->addClass("type-{$type}");
     }
     if ($prop->readOnly) {
         $this->addClass('readonly');
     }
     parent::preRender();
 }
 protected function preRender()
 {
     $prop = $this->props;
     if ($link = $prop->link) {
         extend($prop, ['label' => $link->title(), 'href' => $link->url(), 'icon' => $link->icon(), 'active' => $link->isActive()]);
     }
     $this->disabled = is_null($prop->href) && !exists($prop->script) || $prop->disabled;
     if ($this->disabled) {
         $this->addClass($prop->disabledClass);
     }
     if ($prop->active || exists($prop->href) && str_beginsWith($prop->currentUrl, $prop->href) || $prop->href === '' && $prop->currentUrl === '') {
         $this->cssClassName = $prop->activeClass;
     }
     if (!empty($prop->wrapper)) {
         $this->containerTag = $prop->wrapper;
     }
     parent::preRender();
 }
 protected function preRender()
 {
     if ($this->props->total > 1) {
         parent::preRender();
     }
 }