本文整理汇总了PHP中Institution::findByName方法的典型用法代码示例。如果您正苦于以下问题:PHP Institution::findByName方法的具体用法?PHP Institution::findByName怎么用?PHP Institution::findByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Institution
的用法示例。
在下文中一共展示了Institution::findByName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
}
$elements['lockedfields'] = array('type' => 'fieldset', 'class' => 'last with-formgroup', 'legend' => get_string('Lockedfields', 'admin'), 'collapsible' => true, 'collapsed' => true, 'elements' => array());
if ($institution != 'mahara') {
$elements['lockedfields']['elements']['description'] = array('type' => 'html', 'value' => get_string('disabledlockedfieldhelp1', 'admin', get_field('institution', 'displayname', 'name', 'mahara')));
}
foreach (ArtefactTypeProfile::get_all_fields() as $field => $type) {
$elements['lockedfields']['elements'][$field] = array('type' => 'switchbox', 'title' => get_string($field, 'artefact.internal'), 'defaultvalue' => in_array($field, $lockedprofilefields) || $institution != 'mahara' && in_array($field, $sitelockedfields), 'disabled' => $institution != 'mahara' && in_array($field, $sitelockedfields));
}
// Check for active plugins institution settings.
$elements['pluginsfields'] = array('type' => 'fieldset', 'legend' => get_string('pluginsfields', 'admin'), 'collapsible' => true, 'collapsed' => true, 'elements' => array());
// Get plugins institution settings.
$instobj = null;
if (!$add && $institution != '') {
$instobj = new Institution();
$instobj->findByName($institution);
}
$elements['pluginsfields']['elements'] = array_merge($elements['pluginsfields']['elements'], plugin_institution_prefs_form_elements($instobj));
// Remove plugin fieldset if no fields.
if (empty($elements['pluginsfields']['elements'])) {
unset($elements['pluginsfields']);
}
$elements['submit'] = array('type' => 'submitcancel', 'class' => 'btn-primary', 'value' => array(get_string('submit'), get_string('cancel')));
$institutionform = pieform(array('name' => 'institution', 'renderer' => 'div', 'plugintype' => 'core', 'pluginname' => 'admin', 'elements' => $elements));
} else {
// Get a list of institutions
require_once get_config('libroot') . 'institution.php';
if (!$USER->get('admin')) {
// Filter the list for institutional admins
$filter = $USER->get('admininstitutions');
$showdefault = false;