src/Netzmacht/Bootstrap/Buttons/Factory.php
private static function parseDropdownChild($dropdown, $button)
    {
        if ($dropdown === false || !$dropdown instanceof Dropdown) {
            // @codingStandardsIgnoreStart
            // TODO throw exception?
            // @codingStandardsIgnoreEnd
            return;
        }

        if ($button['type'] == 'child') {
            $child = static::createDropdownItem($button['label'], $button['url'], $button['attributes'], true);
        } else {
            if ($dropdown->getChildren()) {
                $child = static::createDropdownDivider();
                $dropdown->addChild($child);
            }

            $child = static::createDropdownHeader($button['label'], $button['attributes'], true);
        }

        $dropdown->addChild($child);
    }
private static function parseDropdownChild($dropdown, $button)
    {
        if ($dropdown === false || !$dropdown instanceof Dropdown) {
            // @codingStandardsIgnoreStart
            // TODO throw exception?
            // @codingStandardsIgnoreEnd
            return;
        }

        if ($button['type'] == 'child') {
            $child = static::createDropdownItem($button['label'], $button['url'], $button['attributes'], true);
        } else {
            if ($dropdown->getChildren()) {
                $child = static::createDropdownDivider();
                $dropdown->addChild($child);
            }

            $child = static::createDropdownHeader($button['label'], $button['attributes'], true);
        }

        $dropdown->addChild($child);
    }
private static function parseDropdownChild ( $ dropdown , $ button ) { if ( $ dropdown === false || ! $ dropdown instanceof Dropdown ) { // @codingStandardsIgnoreStart // TODO throw exception? // @codingStandardsIgnoreEnd return ; } if ( $ button [ 'type' ] == 'child' ) { $ child = static :: createDropdownItem ( $ button [ 'label' ] , $ button [ 'url' ] , $ button [ 'attributes' ] , true ) ; } else { if ( $ dropdown -> getChildren ( ) ) { $ child = static :: createDropdownDivider ( ) ; $ dropdown -> addChild ( $ child ) ; } $ child = static :: createDropdownHeader ( $ button [ 'label' ] , $ button [ 'attributes' ] , true ) ; } $ dropdown -> addChild ( $ child ) ; }
Parse dropdown child.

@param Dropdown|bool $dropdown Current dropdown element.
@param array         $button   Button definition.

@return void
Parse dropdown child .