source/php/Widget.php
public function widget($args, $instance)
    {
        if (!isset($instance['module_id']) || !is_numeric($instance['module_id'])) {
            return false;
        }

        $display = \Modularity\App::$display;

        $columnWidth = (isset($instance['module_size'])) ? $instance['module_size'] : 'grid-md-4';

        if (isset($instance['module_type']) && $instance['module_type'] == 'mod-slider') {
           $columnWidth = '';
        }

        $columnWidth = apply_filters('Modularity/Widget/ColumnWidth', $columnWidth, $instance);

        $module = \Modularity\Editor::getModule(
            $instance['module_id'],
            array(
                'hidden' => false,
                'columnWidth' => $columnWidth
            )
        );

        $display->outputModule($module, $args);
    }
public function widget($args, $instance)
    {
        if (!isset($instance['module_id']) || !is_numeric($instance['module_id'])) {
            return false;
        }

        $display = \Modularity\App::$display;

        $columnWidth = (isset($instance['module_size'])) ? $instance['module_size'] : 'grid-md-4';

        if (isset($instance['module_type']) && $instance['module_type'] == 'mod-slider') {
           $columnWidth = '';
        }

        $columnWidth = apply_filters('Modularity/Widget/ColumnWidth', $columnWidth, $instance);

        $module = \Modularity\Editor::getModule(
            $instance['module_id'],
            array(
                'hidden' => false,
                'columnWidth' => $columnWidth
            )
        );

        $display->outputModule($module, $args);
    }
public function widget ( $ args , $ instance ) { if ( ! isset ( $ instance [ 'module_id' ] ) || ! is_numeric ( $ instance [ 'module_id' ] ) ) { return false ; } $ display = \ Modularity \ App :: $ display ; $ columnWidth = ( isset ( $ instance [ 'module_size' ] ) ) ? $ instance [ 'module_size' ] : 'grid-md-4' ; if ( isset ( $ instance [ 'module_type' ] ) && $ instance [ 'module_type' ] == 'mod-slider' ) { $ columnWidth = '' ; } $ columnWidth = apply_filters ( 'Modularity/Widget/ColumnWidth' , $ columnWidth , $ instance ) ; $ module = \ Modularity \ Editor :: getModule ( $ instance [ 'module_id' ] , array ( 'hidden' => false , 'columnWidth' => $ columnWidth ) ) ; $ display -> outputModule ( $ module , $ args ) ; }
Outputs the widget content
@param  array $args     Widget arguments
@param  array $instance Widget instance
@return void
Outputs the widget content