Returns concrete widget that will be used for rendering table filter.
185794
def get_widget(self, request):
        
        widget = self.widget
        if isinstance(widget, type):
            widget = widget()
        return widget
475274
def get_widget_css_class(self, attrs):
        """"""
        size_class = 'size-{0}'.format(self.num_inputs)

        if 'class' in attrs:
            attrs['class'] += ' {0}'.format(size_class)
        else:
            attrs['class'] = size_class
903892
def widget_from_tuple(o):
        """"""
        if _matches(o, (Real, Real)):
            min, max, value = _get_min_max_value(o[0], o[1])
            if all(isinstance(_, Integral) for _ in o):
                cls = IntSlider
            else:
                cls = FloatSlider
            return cls(value=value, min=min, max=max)
        elif _matches(o, (Real, Real, Real)):
            step = o[2]
            if step <= 0:
                raise ValueError("step must be >= 0, not %r" % step)
            min, max, value = _get_min_max_value(o[0], o[1], step=step)
            if all(isinstance(_, Integral) for _ in o):
                cls = IntSlider
            else:
                cls = FloatSlider
            return cls(value=value, min=min, max=max, step=step)
1337839
def as_widget(self, widget=None, attrs=None, only_initial=False):
        
        attrs = attrs or {}
        attrs.update(self.form.get_widget_attrs(self))
        if hasattr(self.field, 'widget_css_classes'):
            css_classes = self.field.widget_css_classes
        else:
            css_classes = getattr(self.form, 'widget_css_classes', None)
        if css_classes:
            attrs.update({'class': css_classes})
        widget_classes = self.form.fields[self.name].widget.attrs.get('class', None)
        if widget_classes:
            if attrs.get('class', None):
                attrs['class'] += ' ' + widget_classes
            else:
                attrs.update({'class': widget_classes})
        return super(NgBoundField, self).as_widget(widget, attrs, only_initial)
632084
public function renderFilter()
    {
        //zwrot filtra
        FrontController::getInstance()->getView()->_column = $this;
        return FrontController::getInstance()->getView()->renderTemplate(static::TEMPLATE_FILTER);
    }
173006
def get_filters(self):
        
        return [
            self.compute_style_filter,
            self.render_filter,
            self.calc_widths_filter,
            self.format_row_filter,
            self.align_rows_filter,
        ]
271949
function(widget, options) {
      var manager = self.getWidgetManager(widget.type);
      if (!manager) {
        // Not configured in this project
        self.warnMissingWidgetType(widget.type);
        return '';
      }
      var partial;
      if (!manager.options.wrapperTemplate) {
        partial = _.partial(self.partial, 'widget');
      } else {
        partial = _.partial(manager.partial, manager.options.wrapperTemplate);
      }
      return partial({
        // The widget minus any properties that don't
        // absolutely need to be crammed into a JSON
        // attribute for the editor's benefit. Good filtering
        // here prevents megabytes of markup. -Tom and Sam
        dataFiltered: manager.filterForDataAttribute(widget),
        manager: manager,
        widget: widget,
        options: options,
        output: function() {
          return manager.output(widget, options);
        }
      });
    }
979650
function(widget, name) {

		if (Lava.schema.DEBUG && !name) Lava.t();

		while (widget && widget.name != name) {

			widget = widget.getParentWidget();

		}

		return widget;

	}
967824
def get_widget(self, index=None, path=None, tabs=None):
        
        if (index and tabs) or (path and tabs):
            return tabs.widget(index)
        elif self.plugin:
            return self.get_plugin_tabwidget(self.plugin).currentWidget()
        else:
            return self.plugins_tabs[0][0].currentWidget()
942283
def render_widget(self, request, widget_id):
        ''''''

        widget = get_widget_from_id(widget_id)

        response = widget.render(**{'request': request})

        return JsonResponse({'result': response, 'id': widget_id})
1237956
protected function displayWidgetCell()
    {
        $td_tag = new SwatHtmlTag('td');
        $colspan = $this->view->getXhtmlColspan();
        $td_tag->colspan = $colspan - $this->offset;
        $td_tag->class = 'widget-cell';
        $td_tag->open();
        $this->widget->display();
        $td_tag->close();
    }
313234
function (div) {
        var visWidget = vis.views[vis.activeView].widgets[barsIntern.wid];
        if (visWidget === undefined) {
            for (var view in vis.views) {
                if (view === '___settings') continue;
                if (vis.views[view].widgets[barsIntern.wid]) {
                    visWidget = vis.views[view].widgets[barsIntern.wid];
                    break;
                }
            }
        }

        return visWidget;
    }
280189
def get_form(self, form_class):
        """"""
        kwargs = self.kwargs
        kwargs.update(self.get_form_kwargs())
        kwargs.update({
            'request': self.request,
            'next_view': WidgetCreateView
        })
        return form_class(**kwargs)
526866
def get_widget_for(self, fieldname):
        
        field = self.context.getField(fieldname)
        if not field:
            return None
        return field.widget
1326441
def datagrid_filter(filter_or_attribute, options = {}, &block)
      filter = datagrid_get_filter(filter_or_attribute)
      options = add_html_classes(options, filter.name, datagrid_filter_html_class(filter))
      # Prevent partials option from appearing in HTML attributes
      options.delete(:partials) # Legacy option
      self.send(filter.form_builder_helper_name, filter, options, &block)
    end
63441
private I_CmsFormWidget createTemplateSelector() {

        if (m_handler.useAdeTemplates()) {

            CmsSelectBox selectBox = null;
            Map<String, String> values = new LinkedHashMap<String, String>();
            for (Map.Entry<String, CmsClientTemplateBean> templateEntry : m_handler.getPossibleTemplates().entrySet()) {
                CmsClientTemplateBean template = templateEntry.getValue();
                String title = template.getTitle();
                if ((title == null) || (title.length() == 0)) {
                    title = template.getSitePath();
                }
                values.put(template.getSitePath(), title);
            }
            selectBox = new CmsPropertySelectBox(values);
            return selectBox;
        } else {
            CmsTextBox textbox = new CmsTextBox();
            return textbox;
        }
    }
549213
public FormCreator field( Widget widget )
	{
		return field( widget, totalWidth - currentlyUsedWidth - (fFirstItem ? 0 : spacing) );
	}