public function build($id = '', $class = '', $content = null)
    {
        // Set element attributes
        $this->attr('id', $id);
        $this->addClass($class);

        // Create the instructions holder
        $info = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', '', 'info init');
        $this->append($info);

        // Set attributes
        $settings = [];
        $settings['binding'] = $this->binding;
        $settings['type'] = $this->type;
        $settings['timeout'] = ($this->timeout ?: false);
        $settings['background'] = ($this->background ?: false);
        $settings['fade'] = ($this->fade ?: false);
        $info->data('popup-settings', $settings);

        $extra = [];
        $extra['id'] = $this->popupId;
        $extra['parent_id'] = $this->parent;
        $extra['position'] = $this->position;
        $extra['distance_offset'] = $this->distanceOffset;
        $extra['align_offset'] = $this->alignOffset;
        $extra['invert_dock'] = $this->invertDock;
        $info->data('popup-extra', $extra);

        // Create the popup content holder
        $innerContent = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', $content, '', 'popup-content');
        $this->append($innerContent);

        return $this;
    }
public function build($id = '', $class = '', $content = null)
    {
        // Set element attributes
        $this->attr('id', $id);
        $this->addClass($class);

        // Create the instructions holder
        $info = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', '', 'info init');
        $this->append($info);

        // Set attributes
        $settings = [];
        $settings['binding'] = $this->binding;
        $settings['type'] = $this->type;
        $settings['timeout'] = ($this->timeout ?: false);
        $settings['background'] = ($this->background ?: false);
        $settings['fade'] = ($this->fade ?: false);
        $info->data('popup-settings', $settings);

        $extra = [];
        $extra['id'] = $this->popupId;
        $extra['parent_id'] = $this->parent;
        $extra['position'] = $this->position;
        $extra['distance_offset'] = $this->distanceOffset;
        $extra['align_offset'] = $this->alignOffset;
        $extra['invert_dock'] = $this->invertDock;
        $info->data('popup-extra', $extra);

        // Create the popup content holder
        $innerContent = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', $content, '', 'popup-content');
        $this->append($innerContent);

        return $this;
    }
public function build ( $ id = '' , $ class = '' , $ content = null ) { // Set element attributes $ this -> attr ( 'id' , $ id ) ; $ this -> addClass ( $ class ) ; // Create the instructions holder $ info = $ this -> getHTMLDocument ( ) -> getHTMLFactory ( ) -> buildHtmlElement ( 'div' , '' , '' , 'info init' ) ; $ this -> append ( $ info ) ; // Set attributes $ settings = [ ] ; $ settings [ 'binding' ] = $ this -> binding ; $ settings [ 'type' ] = $ this -> type ; $ settings [ 'timeout' ] = ( $ this -> timeout ? : false ) ; $ settings [ 'background' ] = ( $ this -> background ? : false ) ; $ settings [ 'fade' ] = ( $ this -> fade ? : false ) ; $ info -> data ( 'popup-settings' , $ settings ) ; $ extra = [ ] ; $ extra [ 'id' ] = $ this -> popupId ; $ extra [ 'parent_id' ] = $ this -> parent ; $ extra [ 'position' ] = $ this -> position ; $ extra [ 'distance_offset' ] = $ this -> distanceOffset ; $ extra [ 'align_offset' ] = $ this -> alignOffset ; $ extra [ 'invert_dock' ] = $ this -> invertDock ; $ info -> data ( 'popup-extra' , $ extra ) ; // Create the popup content holder $ innerContent = $ this -> getHTMLDocument ( ) -> getHTMLFactory ( ) -> buildHtmlElement ( 'div' , $ content , '' , 'popup-content' ) ; $ this -> append ( $ innerContent ) ; return $ this ; }
Builds the popup according to settings given.
The settings must be defined before the build function.

@param string           $id
@param string           $class
@param DOMElement|mixed $content The content of the popup.

@return $this
@throws Exception
@throws InvalidArgumentException
Builds the popup according to settings given . The settings must be defined before the build function .