private function buildControls($type = self::TYPE_OK_CANCEL)
    {
        // Create dialog controls container
        $controlsContainer = $this->getFormFactory()->buildHtmlElement('div', '', '', 'dialog-controls');
        $this->form->append($controlsContainer);

        // Button Container
        $btnContainer = $this->getFormFactory()->buildHtmlElement('div', '', '', 'controls-container');
        $controlsContainer->append($btnContainer);

        // Set button literals
        $lbl_submit = ($type == self::TYPE_OK_CANCEL ? 'ok' : 'yes');
        $lbl_reset = ($type == self::TYPE_OK_CANCEL ? 'cancel' : 'no');

        // Insert Controls
        $submitBtn = $this->getFormFactory()->buildSubmitButton($lbl_submit, '', '', 'dialog-submit positive');
        $btnContainer->append($submitBtn);
        $resetBtn = $this->getFormFactory()->buildResetButton($lbl_reset, '', 'dialog-cancel');
        $btnContainer->append($resetBtn);

        return $this;
    }
private function buildControls($type = self::TYPE_OK_CANCEL)
    {
        // Create dialog controls container
        $controlsContainer = $this->getFormFactory()->buildHtmlElement('div', '', '', 'dialog-controls');
        $this->form->append($controlsContainer);

        // Button Container
        $btnContainer = $this->getFormFactory()->buildHtmlElement('div', '', '', 'controls-container');
        $controlsContainer->append($btnContainer);

        // Set button literals
        $lbl_submit = ($type == self::TYPE_OK_CANCEL ? 'ok' : 'yes');
        $lbl_reset = ($type == self::TYPE_OK_CANCEL ? 'cancel' : 'no');

        // Insert Controls
        $submitBtn = $this->getFormFactory()->buildSubmitButton($lbl_submit, '', '', 'dialog-submit positive');
        $btnContainer->append($submitBtn);
        $resetBtn = $this->getFormFactory()->buildResetButton($lbl_reset, '', 'dialog-cancel');
        $btnContainer->append($resetBtn);

        return $this;
    }
private function buildControls ( $ type = self :: TYPE_OK_CANCEL ) { // Create dialog controls container $ controlsContainer = $ this -> getFormFactory ( ) -> buildHtmlElement ( 'div' , '' , '' , 'dialog-controls' ) ; $ this -> form -> append ( $ controlsContainer ) ; // Button Container $ btnContainer = $ this -> getFormFactory ( ) -> buildHtmlElement ( 'div' , '' , '' , 'controls-container' ) ; $ controlsContainer -> append ( $ btnContainer ) ; // Set button literals $ lbl_submit = ( $ type == self :: TYPE_OK_CANCEL ? 'ok' : 'yes' ) ; $ lbl_reset = ( $ type == self :: TYPE_OK_CANCEL ? 'cancel' : 'no' ) ; // Insert Controls $ submitBtn = $ this -> getFormFactory ( ) -> buildSubmitButton ( $ lbl_submit , '' , '' , 'dialog-submit positive' ) ; $ btnContainer -> append ( $ submitBtn ) ; $ resetBtn = $ this -> getFormFactory ( ) -> buildResetButton ( $ lbl_reset , '' , 'dialog-cancel' ) ; $ btnContainer -> append ( $ resetBtn ) ; return $ this ; }
Builds the dialog controls.

@param string $type The dialog buttons type.
Use class constants to define an OK/Cancel or Yes/No type.
Default type is OK/Cancel.

@return $this
@throws InvalidArgumentException
Builds the dialog controls .