Include toggle field js widget.

@param   string $selector
@param   string $widget
@param   array $options
@return  $this
167333
public function toggleField($selector = '.jsToggleField', $widget = 'JBZoo.FieldToggle', array $options = [])
    {
        $this->jqueryFactory();

        $this->Html->script('Core.admin/widget/field-toggle.js', $this->_setOptions([
            'alias'  => __FUNCTION__,
            'weight' => self::WEIGHT_WIDGET
        ]));

        $options = Hash::merge(['token' => $this->request->getCookie('csrfToken')], $options);
        $this->Js->widget($selector, $widget, $options);

        return $this;
    }
210787
public void addTopWidget(Widget w) {

        m_content.removeStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().alertMainContent());
        m_topWidgets.getElement().getStyle().clearDisplay();
        m_topWidgets.add(w);
    }
103163
public function checkbox($fieldName, array $options = [])
    {
        $options = optionsParser($options);

        if (!$options->exists('hiddenField') || !$options->contains('hiddenField', false)) {
            $options->add('hiddenField', true);
        }

        return parent::checkbox($fieldName, $options->toArray());
    }
945174
public static function forWidget(Widget $widget): self
    {
        $values = StringUtil::deserialize($widget->bs_inputGroup, true);
        $helper = new static();

        foreach ($values as $entry) {
            if (!strlen($entry['addon'])) {
                continue;
            }

            if ($entry['position'] === 'after') {
                $helper->addAfter($entry['addon']);
            } else {
                $helper->addBefore($entry['addon']);
            }
        }

        return $helper;
    }
405355
public function append($selector, $value)
    {
        parent::append($selector, $value);

        // if document saved - save through update
        if ($this->getId()) {
            $this->operator->set($selector, $this->get($selector));
        }

        return $this;
    }
768554
public function registerPopover($selector = 'body', $options = array())
    {
        TbArray::defaultValue('selector', 'a[rel=popover]', $options);
        $this->registerPlugin(self::PLUGIN_POPOVER, $selector, $options);
    }
181922
protected function addDeferredJavaScript(WidgetAssetInterface $widget, Response $response)
    {
        if ($this->deferAdded) {
            return;
        }

        $javaScript = $this->render->render(
            'widgetjavascript.twig',
            [
                'widget' => $widget,
            ]
        );
        $snippet = (new Snippet())
            ->setLocation(Target::AFTER_BODY_JS)
            ->setCallback((string) $javaScript)
        ;

        $this->deferAdded = true;

        $this->injector->inject($snippet, Target::AFTER_BODY_JS, $response);
    }
54819
function (includeWidgetCSS) {
        // __textLoaded contains a copy of what is inside the DOM
        var cm = aria.templates.CSSMgr, all = cm.__textLoaded;
        var selectors = [];
        for (var path in all) {
            if (all.hasOwnProperty(path)) {
                if (includeWidgetCSS !== true && cm.__styleTagAssociation[path] === "wgt") {
                    continue;
                }
                selectors = selectors.concat(extractSelectors(all[path].text, path));
            }
        }

        return selectors;
    }
967832
function addWidget($regionBox, $widget, $priority = 0)
    {
        $this->__validateWidget($widget);

        $regionBox = (string) $regionBox;
        if (!array_key_exists($regionBox, $this->__widgets))
            $this->__widgets[$regionBox] = new PriorityQueue();

        /** @var PriorityQueue $queue */
        $queue = $this->__widgets[$regionBox];
        $queue->insert($widget, $priority);

        return $this;
    }
1077659
public function setOptions(array $options) {
		if(isset($options['data_type']))
			$this->data_type = $options['data_type'];
		if(isset($options['default']))
			$this->value = $options['default'];
		if(isset($options['widget']))
			$this->widget = $options['widget'];

		$this->options = array_merge_recursive($this->options, $options);

		return $this;
	}
92310
function(options) {
		PropertyWidget.apply(this, arguments);
		SettingsTextfield.apply(this, arguments);
		if (this.node && options.indent) {
			var spans = this.node.getElementsByTagName('span');
			if (spans) {
				var span = spans[0];
				var existingClassName = span.className;
				if (existingClassName) {
					span.className += " setting-indent";
				} else {
					span.className = "setting-indent";
				}
			}
		}
	}
1123633
public void addSelectOption(CmsSelectWidgetOption option) {

        if (m_selectOptions == null) {
            m_selectOptions = new ArrayList<CmsSelectWidgetOption>();
        }
        m_selectOptions.add(option);
    }
410421
public function lselectLocalizedOptionWithJavascript($selector, $option) {
        $localizedOption = $this->localizeTarget($option);
        $this->selectOptionWithJavascript($selector, $localizedOption);
    }
872232
public function with($selector, Closure $callback)
    {
        $browser = new static(
            $this->driver, new ElementResolver($this->driver, $this->resolver->format($selector))
        );

        if ($this->page) {
            $browser->onWithoutAssert($this->page);
        }

        if ($selector instanceof Component) {
            $browser->onComponent($selector, $this->resolver);
        }

        call_user_func($callback, $browser);

        return $this;
    }
194851
public function options(array $options, string $selected=null) : self {
        foreach ($options as $key => $value) {
            if (is_int($key))
                $key = $value;
            if ($selected == $key)
                $this->elem("option @value=? @selected=selected", [$key])->text($value)->end();
            else
                $this->elem("option @value=?", [$key])->text($value)->end();
        }
        return $this;
    }
619308
public function setOptions( $options ) {
		$this->fields = [];

		// Rebuild the checkboxes
		$this->clearContent();
		$name = $this->name;
		foreach ( $options as $opt ) {
			$optValue = parent::cleanUpValue( $opt['data'] );
			$optDisabled = $opt['disabled'] ?? false;
			$field = new FieldLayout(
				new CheckboxInputWidget( [
					'name' => $name,
					'value' => $optValue,
					'disabled' => $this->isDisabled() || $optDisabled,
				] ),
				[
					'label' => $opt['label'] ?? $optValue,
					'align' => 'inline',
				]
			);

			$this->fields[ $optValue ] = $field;
			$this->appendContent( $field );
		}

		// Re-set the value, checking the checkboxes as needed.
		// This will also get rid of any stale options that we just removed.
		$this->setValue( $this->getValue() );

		return $this;
	}
1305771
public function rightClick($selector = null)
    {
        if (is_null($selector)) {
            (new WebDriverActions($this->driver))->contextClick()->perform();
        } else {
            (new WebDriverActions($this->driver))->contextClick(
                $this->resolver->findOrFail($selector)
            )->perform();
        }

        return $this;
    }