当前位置: 首页>>代码示例>>PHP>>正文


PHP repository::type_config_form方法代码示例

本文整理汇总了PHP中repository::type_config_form方法的典型用法代码示例。如果您正苦于以下问题:PHP repository::type_config_form方法的具体用法?PHP repository::type_config_form怎么用?PHP repository::type_config_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在repository的用法示例。


在下文中一共展示了repository::type_config_form方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: type_config_form

 public static function type_config_form($mform, $classname = 'repository')
 {
     parent::type_config_form($mform, $classname);
     $dspaceUrl = get_config('repository_dspace', 'dspace_url');
     $mform->addElement('text', 'dspace_url', get_string('dspace_url', 'repository_dspace'), array('value' => $dspaceUrl, 'size' => '40'));
     $mform->setType('dspace_url', PARAM_TEXT);
 }
开发者ID:pmarrone,项目名称:Moodle-Dspace-Plugin,代码行数:7,代码来源:lib.php

示例2: type_config_form

 public static function type_config_form($mform, $classname = 'repository')
 {
     $a = new stdClass();
     $a->callbackurl = google_oauth::callback_url()->out(false);
     $mform->addElement('static', null, '', get_string('oauthinfo', 'repository_skydrive', $a));
     parent::type_config_form($mform);
     $strrequired = get_string('required');
     $mform->addElement('text', 'clientid', get_string('clientid', 'repository_skydrive'));
     $mform->addElement('text', 'secret', get_string('secret', 'repository_skydrive'));
     $mform->addRule('clientid', $strrequired, 'required', null, 'client');
     $mform->addRule('secret', $strrequired, 'required', null, 'client');
 }
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:12,代码来源:lib.php

示例3: type_config_form

 public function type_config_form($mform)
 {
     //    global $CFG;
     parent::type_config_form($mform);
     $dspace_url = get_config('dspace', 'dspace_url');
     $dspace_username = get_config('dspace', 'dspace_username');
     $dspace_password = get_config('dspace', 'dspace_password');
     $strrequired = get_string('required');
     $mform->addElement('text', 'dspace_url', get_string('dspaceurl', 'repository_dspace'), array('value' => $dspace_url, 'size' => '50'));
     $mform->addRule('dspace_url', $strrequired, 'required', null, 'client');
     $str_getkey = get_string('dspaceurlinfo', 'repository_dspace');
     $mform->addElement('static', null, '', $str_getkey);
     $mform->addElement('text', 'dspace_username', get_string('dspaceusername', 'repository_dspace'), array('value' => $dspace_username, 'size' => '50'));
     $mform->addElement('password', 'dspace_password', get_string('dspacepassword', 'repository_dspace'), array('value' => $dspace_password, 'size' => '50'));
     $mform->addRule('dspace_username', $strrequired, 'required', null, 'client');
     $mform->addRule('dspace_password', $strrequired, 'required', null, 'client');
 }
开发者ID:saylordotorg,项目名称:Moodle-Repository-Dspace,代码行数:17,代码来源:lib.php

示例4: type_config_form

 /**
  * Add Plugin settings input to Moodle form
  *
  * @param moodleform $mform
  * @param string $classname
  */
 public static function type_config_form($mform, $classname = 'repository')
 {
     global $CFG;
     parent::type_config_form($mform);
     $clientid = get_config('boxnet', 'clientid');
     $clientsecret = get_config('boxnet', 'clientsecret');
     $strrequired = get_string('required');
     $mform->addElement('text', 'clientid', get_string('clientid', 'repository_boxnet'), array('value' => $clientid, 'size' => '40'));
     $mform->addRule('clientid', $strrequired, 'required', null, 'client');
     $mform->setType('clientid', PARAM_RAW_TRIMMED);
     $mform->addElement('text', 'clientsecret', get_string('clientsecret', 'repository_boxnet'), array('value' => $clientsecret, 'size' => '40'));
     $mform->addRule('clientsecret', $strrequired, 'required', null, 'client');
     $mform->setType('clientsecret', PARAM_RAW_TRIMMED);
     $mform->addElement('static', null, '', get_string('information', 'repository_boxnet'));
     if (!is_https()) {
         $mform->addElement('static', null, '', get_string('warninghttps', 'repository_boxnet'));
     }
 }
开发者ID:evltuma,项目名称:moodle,代码行数:24,代码来源:lib.php

示例5: type_config_form

 /**
  * Add Plugin settings input to Moodle form
  *
  * @param object $mform
  */
 public static function type_config_form($mform, $classname = 'repository')
 {
     parent::type_config_form($mform);
     $licensekey = get_config('merlot', 'licensekey');
     if (empty($licensekey)) {
         $licensekey = '';
     }
     $strrequired = get_string('required');
     $mform->addElement('text', 'licensekey', get_string('licensekey', 'repository_merlot'), array('value' => $licensekey, 'size' => '40'));
     $mform->setType('licensekey', PARAM_RAW_TRIMMED);
     $mform->addRule('licensekey', $strrequired, 'required', null, 'client');
 }
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:17,代码来源:lib.php

示例6: type_config_form

 /**
  * Setup repistory form.
  *
  * @param moodleform $mform Moodle form (passed by reference)
  * @param string $classname repository class name
  */
 public static function type_config_form($mform, $classname = 'repository')
 {
     global $CFG;
     $a = new stdClass();
     if (\local_o365\utils::is_configured() !== true) {
         $mform->addElement('static', null, '', get_string('notconfigured', 'repository_onenote', $CFG->wwwroot));
     }
     parent::type_config_form($mform);
 }
开发者ID:eugeneventer,项目名称:o365-moodle,代码行数:15,代码来源:lib.php

示例7: type_config_form

 /**
  * Add Plugin settings input to Moodle form.
  *
  * @inheritDocs
  */
 public static function type_config_form($mform, $classname = 'repository')
 {
     parent::type_config_form($mform);
     $key = get_config('dropbox', 'dropbox_key');
     $secret = get_config('dropbox', 'dropbox_secret');
     if (empty($key)) {
         $key = '';
     }
     if (empty($secret)) {
         $secret = '';
     }
     $mform->addElement('text', 'dropbox_key', get_string('apikey', 'repository_dropbox'), array('value' => $key, 'size' => '40'));
     $mform->setType('dropbox_key', PARAM_RAW_TRIMMED);
     $mform->addElement('text', 'dropbox_secret', get_string('secret', 'repository_dropbox'), array('value' => $secret, 'size' => '40'));
     $mform->addRule('dropbox_key', get_string('required'), 'required', null, 'client');
     $mform->addRule('dropbox_secret', get_string('required'), 'required', null, 'client');
     $mform->setType('dropbox_secret', PARAM_RAW_TRIMMED);
     $mform->addElement('static', null, '', get_string('instruction', 'repository_dropbox'));
     $mform->addElement('static', null, get_string('oauth2redirecturi', 'repository_dropbox'), self::get_oauth2callbackurl()->out());
     $mform->addElement('text', 'dropbox_cachelimit', get_string('cachelimit', 'repository_dropbox'), array('size' => '40'));
     $mform->addRule('dropbox_cachelimit', null, 'numeric', null, 'client');
     $mform->setType('dropbox_cachelimit', PARAM_INT);
     $mform->addElement('static', 'dropbox_cachelimit_info', '', get_string('cachelimit_info', 'repository_dropbox'));
 }
开发者ID:dg711,项目名称:moodle,代码行数:29,代码来源:lib.php

示例8: type_config_form

 public static function type_config_form($mform, $classname = 'repository') {
     parent::type_config_form($mform);
     $strrequired = get_string('required');
     $endpointselect = array( // List of possible Amazon S3 Endpoints.
         "s3.amazonaws.com" => "s3.amazonaws.com",
         "s3-external-1.amazonaws.com" => "s3-external-1.amazonaws.com",
         "s3-us-west-2.amazonaws.com" => "s3-us-west-2.amazonaws.com",
         "s3-us-west-1.amazonaws.com" => "s3-us-west-1.amazonaws.com",
         "s3-eu-west-1.amazonaws.com" => "s3-eu-west-1.amazonaws.com",
         "s3.eu-central-1.amazonaws.com" => "s3.eu-central-1.amazonaws.com",
         "s3-eu-central-1.amazonaws.com" => "s3-eu-central-1.amazonaws.com",
         "s3-ap-southeast-1.amazonaws.com" => "s3-ap-southeast-1.amazonaws.com",
         "s3-ap-southeast-2.amazonaws.com" => "s3-ap-southeast-2.amazonaws.com",
         "s3-ap-northeast-1.amazonaws.com" => "s3-ap-northeast-1.amazonaws.com",
         "s3-sa-east-1.amazonaws.com" => "s3-sa-east-1.amazonaws.com"
     );
     $mform->addElement('text', 'access_key', get_string('access_key', 'repository_s3'));
     $mform->setType('access_key', PARAM_RAW_TRIMMED);
     $mform->addElement('text', 'secret_key', get_string('secret_key', 'repository_s3'));
     $mform->setType('secret_key', PARAM_RAW_TRIMMED);
     $mform->addElement('select', 'endpoint', get_string('endpoint', 'repository_s3'), $endpointselect);
     $mform->setDefault('endpoint', 's3.amazonaws.com'); // Default to US Endpoint.
     $mform->addRule('access_key', $strrequired, 'required', null, 'client');
     $mform->addRule('secret_key', $strrequired, 'required', null, 'client');
 }
开发者ID:educacionbe,项目名称:cursos,代码行数:25,代码来源:lib.php

示例9: type_config_form

    /**
     * Add Plugin settings input to Moodle form
     *
     * @param moodleform $mform
     * @param string $classname
     */
    public static function type_config_form($mform, $classname = 'repository') {
        global $CFG;
        parent::type_config_form($mform);
        $public_account = get_config('boxnet', 'public_account');
        $api_key = get_config('boxnet', 'api_key');
        if (empty($api_key)) {
            $api_key = '';
        }
        $strrequired = get_string('required');
        $mform->addElement('text', 'api_key', get_string('apikey', 'repository_boxnet'), array('value'=>$api_key,'size' => '40'));
        $mform->addRule('api_key', $strrequired, 'required', null, 'client');
        $mform->addElement('static', null, '',  get_string('information','repository_boxnet'));

        //retrieve the flickr instances
        $params = array();
        $params['context'] = array();
        //$params['currentcontext'] = $this->context;
        $params['onlyvisible'] = false;
        $params['type'] = 'boxnet';
        $instances = repository::get_instances($params);
        if (empty($instances)) {
            $callbackurl = get_string('callbackwarning', 'repository_boxnet');
            $mform->addElement('static', null, '',  $callbackurl);
        } else {
            $instance = array_shift($instances);
            $callbackurl = $CFG->wwwroot.'/repository/repository_callback.php?repo_id='.$instance->id;
            $mform->addElement('static', 'callbackurl', '', get_string('callbackurltext', 'repository_boxnet', $callbackurl));
        }
    }
开发者ID:JP-Git,项目名称:moodle,代码行数:35,代码来源:lib.php

示例10: type_config_form

 public static function type_config_form($mform, $classname = 'repository')
 {
     parent::type_config_form($mform);
     $strrequired = get_string('required');
     $mform->addElement('text', 'access_key', get_string('access_key', 'repository_s3'));
     $mform->setType('access_key', PARAM_RAW_TRIMMED);
     $mform->addElement('text', 'secret_key', get_string('secret_key', 'repository_s3'));
     $mform->setType('secret_key', PARAM_RAW_TRIMMED);
     $mform->addRule('access_key', $strrequired, 'required', null, 'client');
     $mform->addRule('secret_key', $strrequired, 'required', null, 'client');
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:11,代码来源:lib.php

示例11: type_config_form

 public static function type_config_form($mform, $classname = 'repository')
 {
     parent::type_config_form($mform, $classname);
     $mform->addElement('text', 'uri', get_string('uri', 'repository_entermedia'), array('size' => '40'));
     $mform->setType('uri', PARAM_URL);
     $mform->addElement('textarea', 'filters', get_string('filters', 'repository_entermedia'));
     $mform->setType('filters', PARAM_TEXT);
     $mform->addElement('checkbox', 'autologin_enable', get_string('autologin_enable', 'repository_entermedia'));
     $mform->setType('autologin_enable', PARAM_TEXT);
     $mform->addHelpButton('autologin_enable', 'autologin', 'repository_entermedia');
     $mform->addElement('text', 'autologin_user', get_string('autologin_user', 'repository_entermedia'));
     $mform->setType('autologin_user', PARAM_TEXT);
     $mform->addElement('passwordunmask', 'autologin_password', get_string('autologin_password', 'repository_entermedia'));
     $mform->setType('autologin_password', PARAM_TEXT);
     $mform->disabledIf('autologin_user', 'autologin_enable');
     $mform->disabledIf('autologin_password', 'autologin_enable');
 }
开发者ID:IT-Kartellet,项目名称:moodle-repository_entermedia,代码行数:17,代码来源:lib.php

示例12: type_config_form

    /**
     * Add Plugin settings input to Moodle form
     * @param object $mform
     */
    public static function type_config_form($mform, $classname = 'repository') {
        global $DB, $CFG, $SESSION, $OUTPUT;

        parent::type_config_form($mform, $classname);

        $mform->addElement('text', 'server_host', get_string('serverurl', 'repository_elisfiles'), array('size' => '40'));
        $mform->setDefault('server_host', 'http://localhost');
        $mform->setType('server_host', PARAM_TEXT);
        $mform->addElement('static', 'server_host_default', '', get_string('elis_files_default_server_host', 'repository_elisfiles'));
        $mform->addElement('static', 'server_host_intro', '', get_string('elis_files_server_host', 'repository_elisfiles'));
        $mform->addRule('server_host', get_string('required'), 'required', null, 'client');

        $mform->addElement('text', 'server_port', get_string('serverport', 'repository_elisfiles'), array('size' => '30'));
        $mform->addElement('static', 'server_port_default', '', get_string('elis_files_default_server_port', 'repository_elisfiles'));
        $mform->addElement('static', 'server_port_intro', '', get_string('elis_files_server_port', 'repository_elisfiles'));

        $mform->addRule('server_port', get_string('required'), 'required', null, 'client');
        $mform->setDefault('server_port', '8080');
        $mform->setType('server_port', PARAM_INT);

        $mform->addElement('text', 'server_username', get_string('serverusername', 'repository_elisfiles'), array('size' => '30'));
        $mform->addElement('static', 'server_username_default', '', get_string('elis_files_default_server_username', 'repository_elisfiles'));
        $mform->addElement('static', 'server_username_intro', '', get_string('elis_files_server_username', 'repository_elisfiles'));
        $mform->addRule('server_username', get_string('required'), 'required', null, 'client');
        $mform->setType('server_username', PARAM_TEXT);

        $mform->addElement('passwordunmask', 'server_password', get_string('serverpassword', 'repository_elisfiles'), array('size' => '30'));
        $mform->addElement('static', 'server_password_intro', '', get_string('elis_files_server_password', 'repository_elisfiles'));
        $mform->addRule('server_password', get_string('required'), 'required', null, 'client');
        $mform->setType('server_password', PARAM_TEXT);

        $options = array(
            ELIS_FILES_XFER_WS  => get_string('webservices', 'repository_elisfiles'),
            ELIS_FILES_XFER_FTP => get_string('ftp', 'repository_elisfiles')
        );

        $mform->addElement('select', 'file_transfer_method', get_string('filetransfermethod', 'repository_elisfiles'), $options);
        $mform->setDefault('file_transfer_method', ELIS_FILES_XFER_FTP);
        $mform->addElement('static', 'file_transfer_method_default', '', get_string('filetransfermethoddefault', 'repository_elisfiles'));
        $mform->addElement('static', 'file_transfer_method_desc', '', get_string('filetransfermethoddesc', 'repository_elisfiles'));

        // Add a green checkmark if FTP connection works, red X on failure
        // (only if transfer method is set to ftp)
        $ftp_indicator = self::get_ftp_config_indicator();
        $mform->addElement('text', 'ftp_port', get_string('ftpport', 'repository_elisfiles'), array('size' => '30'));
        $mform->setDefault('ftp_port', '21');
        $mform->setType('ftp_port', PARAM_INT);
        $mform->addElement('static', 'ftp_port_default', '', $ftp_indicator.'&nbsp'.get_string('ftpportdefault', 'repository_elisfiles'));
        $mform->addElement('static', 'ftp_port_desc', '', get_string('ftpportdesc', 'repository_elisfiles'));

        $mform->addElement('text', 'connect_timeout', get_string('connecttimeout', 'repository_elisfiles'), array('size' => '10'));
        $mform->setType('connect_timeout', PARAM_INT);
        $mform->setDefault('connect_timeout', ELIS_FILES_CURL_CONNECT_TIMEOUT);
        $mform->addElement('static', 'connect_timeout_default', '', get_string('connecttimeoutdefault', 'repository_elisfiles', ELIS_FILES_CURL_CONNECT_TIMEOUT));
        $mform->addElement('static', 'connect_timeout_desc', '', get_string('connecttimeoutdesc', 'repository_elisfiles'));

        $mform->addElement('text', 'response_timeout', get_string('responsetimeout', 'repository_elisfiles'), array('size' => '10'));
        $mform->setType('response_timeout', PARAM_INT);
        $mform->setDefault('response_timeout', ELIS_FILES_CURL_RESPONSE_TIMEOUT);
        $mform->addElement('static', 'response_timeout_default', '', get_string('responsetimeoutdefault', 'repository_elisfiles', ELIS_FILES_CURL_RESPONSE_TIMEOUT));
        $mform->addElement('static', 'response_timeout_desc', '', get_string('responsetimeoutdesc', 'repository_elisfiles'));

        // Check for installed categories table or display 'plugin not yet installed'
        if ($DB->get_manager()->table_exists('repository_elisfiles_cats')) {
        // Need to check for settings to be saved
            $popup_settings ="height=400,width=500,top=0,left=0,menubar=0,location=0,scrollbars,resizable,toolbar,status,directories=0,fullscreen=0,dependent";
            $url = $CFG->wwwroot .'/repository/elisfiles/config-categories.php';
            $jsondata = array('url'=>$url,'name'=>'config_categories','options'=>$popup_settings);
            $jsondata = json_encode($jsondata);
            $title = get_string('configurecategoryfilter', 'repository_elisfiles');

            $button = "<input type='button' value='".$title."' alt='".$title."' title='".$title."' onclick='return openpopup(null,$jsondata);'>";
            $mform->addElement('static', 'category_filter', get_string('categoryfilter', 'repository_elisfiles'), $button);
            $mform->addElement('static', 'category_filter_intro', '', get_string('elis_files_category_filter', 'repository_elisfiles'));
        } else {
            $mform->addElement('static', 'category_filter_intro', get_string('categoryfilter', 'repository_elisfiles'), get_string('elisfilesnotinstalled', 'repository_elisfiles'));
        }

        $popup_settings = "height=480,width=640,top=0,left=0,menubar=0,location=0,scrollbars,resizable,toolbar,status,directories=0,fullscreen=0,dependent";

        $root_folder = get_config('elisfiles', 'root_folder');
        $button = self::output_root_folder_html($root_folder);

        $rootfolderarray=array();
        $rootfolderarray[] = $mform->createElement('text', 'root_folder', get_string('rootfolder', 'repository_elisfiles'), array('size' => '30'));
        $rootfolderarray[] = $mform->createElement('button', 'root_folder_popup', get_string('chooserootfolder', 'repository_elisfiles'), $button);

        $mform->addGroup($rootfolderarray, 'rootfolderar', get_string('rootfolder', 'repository_elisfiles'), array(' '), false);
        $mform->setDefault('root_folder', '/moodle');
        $mform->setType('root_folder', PARAM_TEXT);

        // Add checkmark if get root folder works, or whatever...
        $valid = self::root_folder_is_valid($root_folder);
        $mform->addElement('static', 'root_folder_default', '', $valid.'&nbsp;'.get_string('elis_files_default_root_folder', 'repository_elisfiles'));
        $mform->addElement('static', 'root_folder_intro', '', get_string('elis_files_root_folder', 'repository_elisfiles'));

//.........这里部分代码省略.........
开发者ID:jamesmcq,项目名称:elis,代码行数:101,代码来源:lib.php

示例13: type_config_form

 public static function type_config_form($mform, $classname = 'repository')
 {
     parent::type_config_form($mform);
     $strrequired = get_string('required');
     //$ah = $mform->addElement('select', 'auth_host', get_string('auth_host','repository_rackspace_cf'), array(get_string('US','repository_rackspace_cf'), get_string('UK','repository_rackspace_cf')));
     //$ah->setMultiple(false);
     //$ah->setSelected(get_string('US','repository_rackspace_cf'));
     //$v = $mform->addElement('select', 'version', get_string('version','repository_rackspace_cf'), array(get_string('v1','repository_rackspace_cf'), get_string('v2','repository_rackspace_cf')));
     //$v->setMultiple(false);
     //$v->setSelected(get_string('v1','repository_rackspace_cf'));
     $cdn = $mform->addElement('select', 'cdn', get_string('cdn', 'repository_rackspace_cf'), array(get_string('on', 'repository_rackspace_cf'), get_string('off', 'repository_rackspace_cf')));
     $cdn->setMultiple(false);
     $cdn->setSelected(get_string('on', 'repository_rackspace_cf'));
     $mform->addElement('static', 'spacer', '', '');
     $mform->addElement('static', 'auth_error', '', '');
     $mform->addElement('text', 'username', get_string('username', 'repository_rackspace_cf'));
     $mform->addElement('text', 'api_key', get_string('api_key', 'repository_rackspace_cf'));
     $mform->addElement('static', 'instructions', '', get_string('instruct', 'repository_rackspace_cf'));
     //$mform->addRule('auth_host', $strrequired, 'required', null, 'client');
     //$mform->addRule('version', $strrequired, 'required', null, 'client');
     $mform->addRule('username', $strrequired, 'required', null, 'client');
     $mform->addRule('api_key', $strrequired, 'required', null, 'client');
 }
开发者ID:jlowe64,项目名称:Moodle_Rackspace_Cloud_Files_Embedding,代码行数:23,代码来源:lib.php

示例14: type_config_form

 public function type_config_form($mform)
 {
     parent::type_config_form($mform);
     $strrequired = get_string('required');
     $mform->addElement('text', 'access_key', get_string('access_key', 'repository_s3'));
     $mform->addElement('text', 'secret_key', get_string('secret_key', 'repository_s3'));
     $mform->addRule('access_key', $strrequired, 'required', null, 'client');
     $mform->addRule('secret_key', $strrequired, 'required', null, 'client');
 }
开发者ID:vuchannguyen,项目名称:web,代码行数:9,代码来源:lib.php

示例15: type_config_form

 /**
  * Add Plugin settings input to Moodle form
  * @param object $mform
  */
 public function type_config_form($mform)
 {
     global $CFG;
     parent::type_config_form($mform);
     $key = get_config('dropbox', 'dropbox_key');
     $secret = get_config('dropbox', 'dropbox_secret');
     if (empty($key)) {
         $key = '';
     }
     if (empty($secret)) {
         $secret = '';
     }
     $strrequired = get_string('required');
     $mform->addElement('text', 'dropbox_key', get_string('apikey', 'repository_dropbox'), array('value' => $key, 'size' => '40'));
     $mform->addElement('text', 'dropbox_secret', get_string('secret', 'repository_dropbox'), array('value' => $secret, 'size' => '40'));
     $mform->addRule('dropbox_key', $strrequired, 'required', null, 'client');
     $mform->addRule('dropbox_secret', $strrequired, 'required', null, 'client');
     $str_getkey = get_string('instruction', 'repository_dropbox');
     $mform->addElement('static', null, '', $str_getkey);
 }
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:24,代码来源:lib.php


注:本文中的repository::type_config_form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。