@param string $toggleType

@return string
341779
protected function createToggleButton($toggleType) {
		
		$html = '';
		$html .= CHtml::openTag('label', $this->htmlOptions);
		$html .= "<input type='{$toggleType}' name='{$this->id}_options' id='option_{$this->id}'> {$this->label}";
		$html .= CHtml::closeTag('label');
		
		return $html;
	}
944236
public function getTypeName($type)
    {
        $allowedTypes = $this->getAllowedTypes();

        if ($type && isset($allowedTypes[$type])) {
            return $allowedTypes[$type];
        }

        return t("None"); // @todo
    }
1009745
public static function typeConvert($v, $toType)
    {
        switch ($toType) {
            case 'int':
                $v = (int)$v;
                break;
            case 'float':
                $v = (float)$v;
                break;
            case 'string':
                $v = (string)trim($v);
                break;
        }
        return $v;
    }
1206451
public function toggleAction()
    {
        //wyszukiwanie relacji do edycji
        if (null === $widgetRelation = (new \Cms\Orm\CmsCategoryWidgetCategoryQuery)
            ->whereCmsCategoryId()->equals($this->categoryId)
            ->findPk($this->id)) {
            return '';
        }
        //zmiana widoczności relacji
        $widgetRelation->toggle();
        return '';
    }
540981
protected function getScriptText()
    {
        $togglingControlId = Builder::escapeText($this->togglingControl->getId());
        $toggledControlId  = Builder::escapeText($this->toggledControl->getId());
        $visibility        = "!ToggleControl.Visible";
        if ($this->onlyShow) {
            $visibility = "True";
        } else if ($this->onlyHide) {
            $visibility = "False";
        }
        return "
if (Event.Control.ControlId == {$togglingControlId}) {
	declare ToggleControl = Page.GetFirstChild({$toggledControlId});
	ToggleControl.Visible = {$visibility};
}";
    }
1051821
protected function renderToggleButton()
    {
        $options = $this->togglerOptions;
        Html::addCssClass($options, ['widget' => 'navbar-toggler']);
        return Html::button(
            $this->togglerContent,
            ArrayHelper::merge($options, [
                'type' => 'button',
                'data' => [
                    'toggle' => 'collapse',
                    'target' => '#' . $this->collapseOptions['id'],
                ],
                'aria-controls' => $this->collapseOptions['id'],
                'aria-expanded' => 'false',
                'aria-label' => $this->screenReaderToggleText,
            ])
        );
    }
78939
public function getTypeLabel()
    {
        $types = $this->config()->get('types');
        return isset($types[$this->Type]) ? _t(__CLASS__ . '.TYPE' . strtoupper($this->Type), $types[$this->Type]) : null;
    }
25790
public function turn($toggle)
    {
        if(preg_match_all('/^(on|off) (all)?\s?(debug|info|notice|warn|error|critical|alert|emergency)$/', $toggle, $matches)) {
            $flag = $matches[1][0];
            $all = $matches[2][0];
            $name = $matches[3][0];
            $this->sieve->toggle($flag, $name);
            if($all === 'all') {
                self::$SIEVE->toggle($flag, $name);
            }
        } else {
            throw new \InvalidArgumentException("Invalid format: $toggle");
        }
    }
36987
public function getBindingType()
    {
        $bindingType = $this->session->get(SessionParameter::BINDING_TYPE);

        if (!is_string($bindingType)) {
            return BindingType::cast(BindingType::CUSTOM);
        }

        try {
            return BindingType::cast($bindingType);
        } catch (InvalidEnumerationValueException $exception) {
            return BindingType::cast(BindingType::CUSTOM);
        }
    }
595284
public function getLinkType()
    {
        $types = $this->config()->get('types');
        return isset($types[$this->Type]) ? _t('Links.TYPE'.strtoupper($this->Type), $types[$this->Type]) : null;
    }
910529
public function getType(): string
    {
        if (null === $this->type) {
            $success = true;

            $type = $this->getItem('browscap.type', false, $success);

            if (null !== $type && $success) {
                $this->type = $type;
            }
        }

        return $this->type;
    }
244285
protected function getIdGeneratorTypeString($type)
    {
        if ( ! isset(static::$generatorStrategyMap[$type])) {
            throw new \InvalidArgumentException(sprintf('Invalid provided IdGeneratorType: %s', $type));
        }

        return static::$generatorStrategyMap[$type];
    }
301527
public function run()
    {
        if ($this->toggleButtonOptions !== false) {
            $html[] = $this->renderToggleButton();
        }
        $html[] = $this->renderItems($this->items, $this->options);
        return implode("\n", $html);
    }
948408
public function getToolbar($type = 'actionbar')
    {
        $result = null;

        if(isset($this->__toolbars[$type])) {
            $result = $this->__toolbars[$type];
        }

        return $result;
    }
1069221
public static function getConfigByType($type)
	{
		$configPath = null;

		try {
			$templatePaths = CustomTemplate::getTemplates($type);
			if (!empty($templatePaths[0])) {
				$configPath = substr($templatePaths[0], 0, -6) . '_config.php';
			}
		}
		catch (\Exception $e) {
			$configPath = null;
		}

		if ($configPath === null || !file_exists($configPath)) {
			$allConfigs = array_merge(
				glob(TL_ROOT . '/templates/' . $type . '_config.php') ?: array(),
				glob(TL_ROOT . '/templates/*/' . $type . '_config.php') ?: array()
			);
			if (count($allConfigs)) {
				$configPath = $allConfigs[0];
			}
			else {
				return;
			}
		}

		$config = include $configPath;

		if ($config) {
			$config['fields'] = is_array($config['fields']) ? $config['fields'] : array();
		}

		return $config;
	}
711835
protected function getTypeForString($type)
    {
        switch ($type) {
            case 'string':
                return DataTypes::STRING_TYPE;
            case 'number':
                return DataTypes::NUMBER_TYPE;
            case 'date':
            case 'datetime':
                return DataTypes::DATETIME_TYPE;
            case 'boolean':
                return DataTypes::BOOLEAN_TYPE;
            case 'tags':
                return DataTypes::TAGS_TYPE;
            case 'auto-complete':
                return DataTypes::AUTO_COMPLETE_TYPE;
            default:
                return DataTypes::UNDEFINED_TYPE;
        }
    }
893716
function _toggleBoundaryToggle () {
        var somethingEntered = false;

        $('input[type="number"]').each(function () {
            if (parseInt(this.value, 10) !== 0) {
                somethingEntered = true;
            }
        });

        if (somethingEntered) {
            $showBoundsCheck.parent().slideDown();
        }
        else {
            $showBoundsCheck.parent().slideUp();
        }
    }