if (!empty($edit)) {
$repositorytype = repository_get_type_by_typename($edit);
$classname = 'repository_' . $repositorytype->get_typename();
- $configs = call_user_func(array($classname,'get_admin_option_names'));
+ $configs = call_user_func(array($classname,'get_type_option_names'));
$plugin = $repositorytype->get_typename();
} else {
$plugin = $new;
//detect if we create a new type without config (in this case if don't want to display a setting page during creation)
$createnewtype = false;
if (!empty($new)) {
- $adminconfignames = repository_static_function($new, 'get_admin_option_names');
+ $adminconfignames = repository_static_function($new, 'get_type_option_names');
$createnewtype = empty($adminconfignames);
}
// end setup, begin output
as $repositorytype)
{
//display setup page for plugins with: general options or multiple instances
- $adminconfignames = repository_static_function($repositorytype->get_typename(), 'get_admin_option_names');
+ $adminconfignames = repository_static_function($repositorytype->get_typename(), 'get_type_option_names');
if (!empty($adminconfignames)
|| repository_static_function($repositorytype->get_typename(), 'has_multiple_instances')) {
$ADMIN->add('repositorysettings',
foreach ($instances as $i) {
$settings = '';
//display edit link only if you can config the type or if it has multiple instances
- $adminconfignames = repository_static_function($i->get_typename(), 'get_admin_option_names');
+ $adminconfignames = repository_static_function($i->get_typename(), 'get_type_option_names');
if ( !empty($adminconfignames)
|| repository_static_function($i->get_typename(), 'has_multiple_instances')) {
$settings .= '<a href="' . $this->baseurl . '&edit=' . $i->get_typename() . '">'
return false;
}
- public static function get_admin_option_names() {
+ public static function get_type_option_names() {
return array('api_key');
}
$mform->addRule('secret', $strrequired, 'required', null, 'client');
}
- public static function get_admin_option_names() {
+ public static function get_type_option_names() {
return array('api_key', 'secret');
}
$mform->addElement('static', null, '', get_string('information','repository_flickr_public'));
}
- public static function get_admin_option_names() {
+ public static function get_type_option_names() {
return array('api_key');
}
//set options attribut
$this->_options = array();
- $options = repository_static_function($typename,'get_admin_option_names');
+ $options = repository_static_function($typename,'get_type_option_names');
//check that the type can be setup
if (!empty($options)) {
//set the type options
* By default: no general option name
* @return array
*/
- public static function get_admin_option_names() {
+ public static function get_type_option_names() {
return array();
}
// and set the data if we have some.
if ($this->instance) {
$data = array();
- $option_names = call_user_func(array($classname,'get_admin_option_names'));
+ $option_names = call_user_func(array($classname,'get_type_option_names'));
$instanceoptions = $this->instance->get_options();
foreach ($option_names as $config) {
if (!empty($instanceoptions[$config])) {