protected function _elementTpl($name, $value = '', $id = '', $text = '', array $attrs = array())
    {
        $alias    = Str::slug($value, true);
        $inpClass = $this->_jbSrt('val-' . $alias);
        $input    = $this->input($name, $value, $id, $inpClass, $attrs);

        if ($this->_tpl === 'default') {
            return $input . $this->label($id, $alias, $text);
        } elseif ($this->_tpl === 'wrap') {
            return $this->label($id, $alias, $input . ' ' . $text);
        }

        if (is_callable($this->_tpl)) {
            return call_user_func($this->_tpl, $this, $name, $value, $id, $text, $attrs);
        }

        return null;
    }
protected function _elementTpl($name, $value = '', $id = '', $text = '', array $attrs = array())
    {
        $alias    = Str::slug($value, true);
        $inpClass = $this->_jbSrt('val-' . $alias);
        $input    = $this->input($name, $value, $id, $inpClass, $attrs);

        if ($this->_tpl === 'default') {
            return $input . $this->label($id, $alias, $text);
        } elseif ($this->_tpl === 'wrap') {
            return $this->label($id, $alias, $input . ' ' . $text);
        }

        if (is_callable($this->_tpl)) {
            return call_user_func($this->_tpl, $this, $name, $value, $id, $text, $attrs);
        }

        return null;
    }
protected function _elementTpl ( $ name , $ value = '' , $ id = '' , $ text = '' , array $ attrs = array ( ) ) { $ alias = Str :: slug ( $ value , true ) ; $ inpClass = $ this -> _jbSrt ( 'val-' . $ alias ) ; $ input = $ this -> input ( $ name , $ value , $ id , $ inpClass , $ attrs ) ; if ( $ this -> _tpl === 'default' ) { return $ input . $ this -> label ( $ id , $ alias , $ text ) ; } elseif ( $ this -> _tpl === 'wrap' ) { return $ this -> label ( $ id , $ alias , $ input . ' ' . $ text ) ; } if ( is_callable ( $ this -> _tpl ) ) { return call_user_func ( $ this -> _tpl , $ this , $ name , $ value , $ id , $ text , $ attrs ) ; } return null ; }
Single element template output.

@param string $name
@param string $value
@param string $id
@param string $text
@param array $attrs
@return mixed|null|string
Single element template output .