public function get_availability_tree() {
        if (is_null($this->availabilitytree)) {
            if (is_null($this->availability)) {
                throw new \coding_exception(
                        'Cannot call get_availability_tree with null availability');
            }
            $this->availabilitytree = $this->decode_availability($this->availability, true);
        }
        return $this->availabilitytree;
    }
public function get_availability_tree() {
        if (is_null($this->availabilitytree)) {
            if (is_null($this->availability)) {
                throw new \coding_exception(
                        'Cannot call get_availability_tree with null availability');
            }
            $this->availabilitytree = $this->decode_availability($this->availability, true);
        }
        return $this->availabilitytree;
    }
public function get_availability_tree ( ) { if ( is_null ( $ this -> availabilitytree ) ) { if ( is_null ( $ this -> availability ) ) { throw new \ coding_exception ( 'Cannot call get_availability_tree with null availability' ) ; } $ this -> availabilitytree = $ this -> decode_availability ( $ this -> availability , true ) ; } return $ this -> availabilitytree ; }
Gets the availability tree, decoding it if not already done.

@return tree Availability tree
Gets the availability tree decoding it if not already done .