第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

當添加自定義塊的心情顯示[[pluginname]]

當添加自定義塊的心情顯示[[pluginname]]

PHP
翻閱古今 2021-05-07 16:08:38
我正在為穆迪創(chuàng)建自定義塊,當我嘗試將其添加到頁面時,如下所示:而不是指定的名稱。該version.php文件具有以下內容:$plugin->component = 'block_userlist';$plugin->version = 2019050316;$plugin->requires = 2018120300;并且該塊定義為:defined('MOODLE_INTERNAL') || die();class block_userlist extends block_base {    public function init() {        $this->title = get_string('userlist', 'block_userlist');    }    // The PHP tag and the curly bracket for the class definition     // will only be closed after there is another function added in the next section.    public function get_content() {        global $DB;        // if ($this->content !== null) {        //   return $this->content;        // }        $user = $DB->get_record_sql('SELECT COUNT(*) as total_users FROM {user};');        $this->content         =  new stdClass;        $this->content->text  .= 'The content of our ';        $this->content->text  .= html_writer::tag('span','UserList',['style'=>'color:red']);        $this->content->text  .= ' block!';        $this->content->footer = "Τotal Users: $user->total_users";        return $this->content;    }}那么我該如何設置一個不同于的名稱[[pluginame]]呢?
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 179 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號