summaryrefslogtreecommitdiff
path: root/modules/field_ui/field_ui.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/field_ui/field_ui.module')
-rw-r--r--modules/field_ui/field_ui.module23
1 files changed, 17 insertions, 6 deletions
diff --git a/modules/field_ui/field_ui.module b/modules/field_ui/field_ui.module
index 3be23c889..b8b80db96 100644
--- a/modules/field_ui/field_ui.module
+++ b/modules/field_ui/field_ui.module
@@ -1,8 +1,7 @@
<?php
-
/**
* @file
- * Allows administrators to associate custom fields to fieldable types.
+ * Allows administrators to attach custom fields to fieldable types.
*/
/**
@@ -213,6 +212,11 @@ function field_ui_menu() {
* The position of $bundle_name in $map.
* @param $map
* The translated menu router path argument map.
+ *
+ * @return
+ * The field instance array.
+ *
+ * @ingroup field
*/
function field_ui_menu_load($field_name, $entity_type, $bundle_name, $bundle_pos, $map) {
// Extract the actual bundle name from the translated argument map.
@@ -313,7 +317,7 @@ function field_ui_field_attach_create_bundle($entity_type, $bundle) {
}
/**
- * Helper function to create the right administration path for a bundle.
+ * Determines the adminstration path for a bundle.
*/
function _field_ui_bundle_admin_path($entity_type, $bundle_name) {
$bundles = field_info_bundles($entity_type);
@@ -324,7 +328,7 @@ function _field_ui_bundle_admin_path($entity_type, $bundle_name) {
}
/**
- * Helper function to identify inactive fields within a bundle.
+ * Identifies inactive fields within a bundle.
*/
function field_ui_inactive_instances($entity_type, $bundle_name = NULL) {
if (!empty($bundle_name)) {
@@ -351,7 +355,12 @@ function field_ui_inactive_instances($entity_type, $bundle_name = NULL) {
}
/**
- * Add a button Save and add fields to Create content type form.
+ * Implements hook_form_FORM_ID_alter().
+ *
+ * Adds a button 'Save and add fields' to the 'Create content type' form.
+ *
+ * @see node_type_form()
+ * @see field_ui_form_node_type_form_submit()
*/
function field_ui_form_node_type_form_alter(&$form, $form_state) {
// We want to display the button only on add page.
@@ -366,7 +375,9 @@ function field_ui_form_node_type_form_alter(&$form, $form_state) {
}
/**
- * Redirect to manage fields form.
+ * Form submission handler for the 'Save and add fields' button.
+ *
+ * @see field_ui_form_node_type_form_alter()
*/
function field_ui_form_node_type_form_submit($form, &$form_state) {
if ($form_state['triggering_element']['#parents'][0] === 'save_continue') {