function is_empty() {
        if ( !has_capability('moodle/block:view', $this->context) ) {
            return true;
        }

        $this->get_content();
        return(empty($this->content->text) && empty($this->content->footer));
    }
function is_empty() {
        if ( !has_capability('moodle/block:view', $this->context) ) {
            return true;
        }

        $this->get_content();
        return(empty($this->content->text) && empty($this->content->footer));
    }
function is_empty ( ) { if ( ! has_capability ( 'moodle/block:view' , $ this -> context ) ) { return true ; } $ this -> get_content ( ) ; return ( empty ( $ this -> content -> text ) && empty ( $ this -> content -> footer ) ) ; }
Returns true or false, depending on whether this block has any content to display
and whether the user has permission to view the block

@return boolean
Returns true or false depending on whether this block has any content to display and whether the user has permission to view the block