public function getWrapper($wrapper, $attr)
    {
        $type = '';
        if (! empty($attr['type'])) {
            $type = ' ' . $attr['type'];

            if ((isset($attr['type']) && $attr['type'] == 'select') && in_array('multiple', $attr)) {
                $type .= ' multiselect';
            }
        }

        $defaults = array(
            'tag' => 'div',
            'class' => 'input' . $type
        );

        $wrapperAttr = array_merge(
            $defaults,
            $wrapper
        );

        // double check for the presence of a tag element
        $tag = $wrapperAttr['tag'];
        unset($wrapperAttr['tag']);

        return array(
            'tag' => $tag,
            'attr' => $wrapperAttr
        );
    }
public function getWrapper($wrapper, $attr)
    {
        $type = '';
        if (! empty($attr['type'])) {
            $type = ' ' . $attr['type'];

            if ((isset($attr['type']) && $attr['type'] == 'select') && in_array('multiple', $attr)) {
                $type .= ' multiselect';
            }
        }

        $defaults = array(
            'tag' => 'div',
            'class' => 'input' . $type
        );

        $wrapperAttr = array_merge(
            $defaults,
            $wrapper
        );

        // double check for the presence of a tag element
        $tag = $wrapperAttr['tag'];
        unset($wrapperAttr['tag']);

        return array(
            'tag' => $tag,
            'attr' => $wrapperAttr
        );
    }
public function getWrapper ( $ wrapper , $ attr ) { $ type = '' ; if ( ! empty ( $ attr [ 'type' ] ) ) { $ type = ' ' . $ attr [ 'type' ] ; if ( ( isset ( $ attr [ 'type' ] ) && $ attr [ 'type' ] == 'select' ) && in_array ( 'multiple' , $ attr ) ) { $ type .= ' multiselect' ; } } $ defaults = array ( 'tag' => 'div' , 'class' => 'input' . $ type ) ; $ wrapperAttr = array_merge ( $ defaults , $ wrapper ) ; // double check for the presence of a tag element $ tag = $ wrapperAttr [ 'tag' ] ; unset ( $ wrapperAttr [ 'tag' ] ) ; return array ( 'tag' => $ tag , 'attr' => $ wrapperAttr ) ; }
given any user defined wrapper instructions
build the wrapper data

@param   array   Array of any passed wrapper info
@param   array   Array of the inputs attributes
@return  array   two element array of tag / attr
given any user defined wrapper instructions build the wrapper data