src/Helper/InputGroupHelper.php
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;
    }
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;
    }
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 ; }
Create input group helper for a widget.

@param Widget $widget Form widget.

@return static
Create input group helper for a widget .