src/Services/NestableService.php
public function ul($items = false, $parent_id = 0, $first = false)
    {
        $attrs = '';

        if (! $first && is_array($this->optionUlAttr) && count($this->optionUlAttr) > 0) {
            $attrs = $this->renderAttr($this->optionUlAttr, $parent_id);
        }
        else if($first && count($this->firstUlAttrs) > 0) {
            $attrs = $this->renderAttr($this->firstUlAttrs, $parent_id);
        }

        if (!$items) {
            return "\n".'<ul'.$attrs.'>'."\n";
        }

        return '<ul'.$attrs.'>'."\n".$items."\n".'</ul>';
    }
public function ul($items = false, $parent_id = 0, $first = false)
    {
        $attrs = '';

        if (! $first && is_array($this->optionUlAttr) && count($this->optionUlAttr) > 0) {
            $attrs = $this->renderAttr($this->optionUlAttr, $parent_id);
        }
        else if($first && count($this->firstUlAttrs) > 0) {
            $attrs = $this->renderAttr($this->firstUlAttrs, $parent_id);
        }

        if (!$items) {
            return "\n".'<ul'.$attrs.'>'."\n";
        }

        return '<ul'.$attrs.'>'."\n".$items."\n".'</ul>';
    }
public function ul ( $ items = false , $ parent_id = 0 , $ first = false ) { $ attrs = '' ; if ( ! $ first && is_array ( $ this -> optionUlAttr ) && count ( $ this -> optionUlAttr ) > 0 ) { $ attrs = $ this -> renderAttr ( $ this -> optionUlAttr , $ parent_id ) ; } else if ( $ first && count ( $ this -> firstUlAttrs ) > 0 ) { $ attrs = $ this -> renderAttr ( $ this -> firstUlAttrs , $ parent_id ) ; } if ( ! $ items ) { return "\n" . '<ul' . $ attrs . '>' . "\n" ; } return '<ul' . $ attrs . '>' . "\n" . $ items . "\n" . '</ul>' ; }
Generate open ul tag.

@param string $items

@return string
Generate open ul tag .