function fe_paths_config_table_form in File Entity Paths 7.2
Form builder for File Entity Paths configuration list table.
_state
Parameters
$form:
$configs:
Return value
array
1 string reference to 'fe_paths_config_table_form'
- fe_paths_global_page in ./
fe_paths.admin.inc - Page callback for admin/config/media/fe-paths page.
File
- ./
fe_paths.admin.inc, line 324 - Admin ui for the File Entity Paths module.
Code
function fe_paths_config_table_form($form, &$form_state, $configs) {
$form_state['configs'] = $configs;
$form = array(
'config' => array(
'#prefix' => '<div id="config-order-form">',
'#suffix' => '</div>',
'#tree' => TRUE,
'#theme' => 'fe_paths_config_table',
),
);
foreach ($configs as $name => $config) {
$form['config'][$name]['label'] = array(
'#markup' => check_plain($config->label),
);
$form['config'][$name]['weight'] = array(
'#type' => 'textfield',
'#default_value' => $config->weight,
'#size' => 3,
'#attributes' => array(
'class' => array(
'order-weight',
),
),
);
$form['config'][$name]['machine_name'] = array(
'#markup' => check_plain($config->machine_name),
);
$form['config'][$name]['status'] = array(
'#markup' => $config->status ? t('Enabled') : t('Disabled'),
);
$form['config'][$name]['path'] = array(
'#markup' => check_plain($config->path),
);
$form['config'][$name]['filename'] = array(
'#markup' => check_plain($config->filename),
);
$form['config'][$name]['data'] = array(
'#markup' => theme('fe_paths_config_data', array(
'config' => $config,
)),
);
$form['config'][$name]['link'] = array(
'#markup' => l(t('Edit'), "admin/config/media/fe-paths/{$config->id}/edit") . '</br>' . l(t('Delete'), "admin/config/media/fe-paths/{$config->id}/delete"),
);
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Order'),
);
return $form;
}