public function insertDrawer(XMLElement $drawer, $position = 'horizontal', $button = 'append')
    {
        $drawer->addClass($position);
        $drawer->setAttribute('data-position', $position);
        $drawer->setAttribute('role', 'complementary');
        $this->Drawer[$position][] = $drawer;

        if (in_array($button, array('prepend', 'append'))) {
            $this->insertAction(
                Widget::Anchor(
                    $drawer->getAttribute('data-label'),
                    '#' . $drawer->getAttribute('id'),
                    null,
                    'button drawer ' . $position
                ),
                ($button === 'append' ? true : false)
            );
        }
    }
public function insertDrawer(XMLElement $drawer, $position = 'horizontal', $button = 'append')
    {
        $drawer->addClass($position);
        $drawer->setAttribute('data-position', $position);
        $drawer->setAttribute('role', 'complementary');
        $this->Drawer[$position][] = $drawer;

        if (in_array($button, array('prepend', 'append'))) {
            $this->insertAction(
                Widget::Anchor(
                    $drawer->getAttribute('data-label'),
                    '#' . $drawer->getAttribute('id'),
                    null,
                    'button drawer ' . $position
                ),
                ($button === 'append' ? true : false)
            );
        }
    }
public function insertDrawer ( XMLElement $ drawer , $ position = 'horizontal' , $ button = 'append' ) { $ drawer -> addClass ( $ position ) ; $ drawer -> setAttribute ( 'data-position' , $ position ) ; $ drawer -> setAttribute ( 'role' , 'complementary' ) ; $ this -> Drawer [ $ position ] [ ] = $ drawer ; if ( in_array ( $ button , array ( 'prepend' , 'append' ) ) ) { $ this -> insertAction ( Widget :: Anchor ( $ drawer -> getAttribute ( 'data-label' ) , '#' . $ drawer -> getAttribute ( 'id' ) , null , 'button drawer ' . $ position ) , ( $ button === 'append' ? true : false ) ) ; } }
Allows a Drawer element to added to the backend page in one of three
positions, `horizontal`, `vertical-left` or `vertical-right`. The button
to trigger the visibility of the drawer will be added after existing
actions by default.

@since Symphony 2.3
@see core.Widget#Drawer
@param XMLElement $drawer
An XMLElement representing the drawer, use `Widget::Drawer` to construct
@param string $position
Where `$position` can be `horizontal`, `vertical-left` or
`vertical-right`. Defaults to `horizontal`.
@param string $button
If not passed, a button to open/close the drawer will not be added
to the interface. Accepts 'prepend' or 'append' values, which will
add the button before or after existing buttons. Defaults to `prepend`.
If any other value is passed, no button will be added.
@throws InvalidArgumentException
Allows a Drawer element to added to the backend page in one of three positions horizontal vertical - left or vertical - right . The button to trigger the visibility of the drawer will be added after existing actions by default .