public function active($attr = true, $className = '')
    {
        if (!$className) {
            $className = $this->config->get('crumbs.current_item_class');
        }

        if ($attr) {
            return $this->isActive() ? 'class="' . $className . '"' : '';
        }

        return $this->isActive() ? $className : '';
    }
public function active($attr = true, $className = '')
    {
        if (!$className) {
            $className = $this->config->get('crumbs.current_item_class');
        }

        if ($attr) {
            return $this->isActive() ? 'class="' . $className . '"' : '';
        }

        return $this->isActive() ? $className : '';
    }
public function active ( $ attr = true , $ className = '' ) { if ( ! $ className ) { $ className = $ this -> config -> get ( 'crumbs.current_item_class' ) ; } if ( $ attr ) { return $ this -> isActive ( ) ? 'class="' . $ className . '"' : '' ; } return $ this -> isActive ( ) ? $ className : '' ; }
Return current crumb item class name when needed.

@param bool   $attr      If true, it will return `class="active"`.
@param string $className Active item class. Default: 'active'

@return string
Return current crumb item class name when needed .