<?php

namespace Clevercherry\Backslash4\Models;

class Blog extends Model
{
    use scopeActive;


    /**
    * return an array widget info
    * @return Array of widget info for display on the admin dashboard
    */
    public static function getDashboardWidgets()
    {
        $widgets=[];

        // $widgets[]=['type'=>'bs-dashboard-widget.info',
        //             'heading'=>"No. of Blogs/News Articles",
        //             'text'=> 'Active '.self::active()->count('id').'<br>'
        //                     .'All '.self::count('id'),
        //             'widget-order' => 4000
        //           ];
        return $widgets;
    }

    public function includeInSitemap() : bool
    {
        return $this->active;
    }

    public function includeModelInSitemap() : bool
    {
        return true;
    }
    
    /**
     * Adds model description text under the main <h1> tag.
     * 
     * @return String content to be displayed under the the index page heading.
     */

    public static function getExtraIndexHeaderView()
    {
        return '<p class="mt-1 text-body-tertiary">Keep users up-to-date with your latest news.</p>';
    }

}