function shorten_cs_edit in Shorten URLs 8
Same name and namespace in other branches
- 8.2 modules/shorten_cs/shorten_cs.admin.inc \shorten_cs_edit()
- 6 shorten_cs.admin.inc \shorten_cs_edit()
- 7.2 shorten_cs.admin.inc \shorten_cs_edit()
- 7 shorten_cs.admin.inc \shorten_cs_edit()
Builds the form to edit a custom service.
3 string references to 'shorten_cs_edit'
- CustomServicesEditForm::getFormId in modules/
shorten_cs/ src/ Form/ CustomServicesEditForm.php - Returns a unique string identifying the form.
- DefaultController::shorten_cs_edit_form in modules/
shorten_cs/ src/ Controller/ DefaultController.php - shorten_cs_edit_form in modules/
shorten_cs/ shorten_cs.admin.inc - Returns HTML representing the shorten service edit form.
File
- modules/
shorten_cs/ shorten_cs.admin.inc, line 27 - Provides the configuration page for Shorten URLs Custom Services.
Code
function shorten_cs_edit($form, &$form_state, $service) {
$form = shorten_cs_add_form($form, $form_state);
foreach (array(
'name',
'url',
'type',
'tag',
) as $key) {
$form[$key]['#default_value'] = $service->{$key};
}
$form['sid'] = array(
'#type' => 'value',
'#value' => $service->sid,
);
$form['old_name'] = array(
'#type' => 'value',
'#value' => $service->name,
);
return $form;
}