{"id": "doc-drupal7-00047e0532", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/comment_unpublish_action/7.x", "instruction": "What does the comment_unpublish_action function do in Drupal 7?", "context": "", "response": "function comment_unpublish_action($comment, $context = array()): Unpublishes a comment by setting its status to COMMENT_NOT_PUBLISHED and logs the action in watchdog.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-002dbaa696", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.pages.inc/function/node_form_submit_build_node/7.x", "instruction": "What does the node_form_submit_build_node function do in Drupal 7 and what does it return?", "context": "", "response": "function node_form_submit_build_node($form, &$form_state): Updates the node from the form state by processing submitted values, executes form submit handlers, builds the node entity, and returns the resulting node.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-00335a29ca", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_search_access/7.x", "instruction": "What does the node_search_access function do in Drupal 7?", "context": "", "response": "function node_search_access(): Returns TRUE if the user has the 'access content' permission, implementing hook_search_access().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0040f35e6f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.admin.inc/function/image_effect_delete_form/7.x", "instruction": "How does image_effect_delete_form build the deletion confirmation form in Drupal 7 and what data does it store in $form_state?", "context": "", "response": "function image_effect_delete_form($form, &$form_state, $style, $effect): Stores the image style and effect in $form_state, builds a confirmation message with the style and effect names, and returns a confirmation form whose cancel destination is the image style edit page.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-00439d2f4e", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21block%21block.install/function/block_update_dependencies/7.x", "instruction": "What does the block_update_dependencies function implemented in block.install do in Drupal 7 and what update dependencies does it declare?", "context": "", "response": "function block_update_dependencies(): Declares that block_update_7005() must run after filter_update_7000() because it needs to query the {filter_format} table that the latter creates.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0068bce6f7", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_image/7.x", "instruction": "What does the theme_image function do in Drupal 7 and how does it generate HTML for an image?", "context": "", "response": "function theme_image($variables): Returns the HTML for an image by building the tag with the path, width, height, alt, title, and attributes provided in $variables.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-008764dc2d", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21openid%21openid.module/function/openid_openid_discovery_method_info/7.x", "instruction": "What OpenID discovery methods does the openid_openid_discovery_method_info function define in Drupal?", "context": "", "response": "function openid_openid_discovery_method_info(): Returns an array with standard discovery methods, specifying that the process stops when one works and listing 'xri' and 'xrds' as the supported methods.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-008d1593c0", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21theme.inc/class/ThemeRegistry/7.x", "instruction": "What does the offsetExists method of the ThemeRegistry class do in Drupal?", "context": "", "response": "public function offsetExists($offset): Checks whether a specific key exists in the theme registry.", "tags": ["api-reference", "class"], "created_at": "2026-09-27"} {"id": "doc-drupal7-009783f3c0", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_radios/7.x", "instruction": "What does the theme_radios function do in Drupal?", "context": "", "response": "function theme_radios($variables): Returns HTML for a set of radio button form elements.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-009a218a97", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/external_documentation%21developer%21globals.php/global/channel/7.x", "instruction": "What information does the global $channel variable contain in Drupal 7?", "context": "", "response": "global $channel;: is an associative array containing title, link, description, and other keys, where the link must be an absolute URL.", "tags": ["api-reference", "global"], "created_at": "2026-09-30"} {"id": "doc-drupal7-00b77e8780", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21shortcut%21shortcut.module/function/shortcut_set_delete/7.x", "instruction": "How does the shortcut_set_delete function delete a shortcut set in Drupal 7?", "context": "", "response": "function shortcut_set_delete($shortcut_set): deletes a shortcut set, preventing deletion of the default set, and removes its user assignments, menu links, and the set record from the database.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-00c1045e22", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_load_stylesheet_content/7.x", "instruction": "What does the drupal_load_stylesheet_content function do in Drupal 7?", "context": "", "response": "function drupal_load_stylesheet_content($contents, $optimize = FALSE): Processes stylesheet content for aggregation, optionally optimizes it (minifies), and returns the content including imported stylesheets.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0120dbcfc7", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21color%21color.install/function/color_update_7001/7.x", "instruction": "What does the color_update_7001 function do in Drupal 7?", "context": "", "response": "function color_update_7001(): warns the site administrator if unsafe CSS color codes are found in the database.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0123349a46", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21taxonomy%21taxonomy.install/function/taxonomy_update_7002/7.x", "instruction": "What does the taxonomy_update_7002 function do in Drupal 7 and how does it modify the taxonomy_vocabulary table?", "context": "", "response": "function taxonomy_update_7002(): Adds the machine_name column to taxonomy_vocabulary, populates it with unique values, and adds a uniqueness constraint.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0149c90d7e", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21translation%21translation.module/function/translation_path_get_translations/7.x", "instruction": "What does the translation_path_get_translations function do in Drupal 7?", "context": "", "response": "function translation_path_get_translations($path): Returns the paths of all translations of a node from its Drupal path, grouped by language code.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0166354485", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21database%21pgsql%21query.inc/class/InsertQuery_pgsql/7.x", "instruction": "What does the execute method of the InsertQuery_pgsql class do in Drupal?", "context": "", "response": "public function execute(): executes the insertion, processing blobs and serial fields, and returns the last inserted ID.", "tags": ["api-reference", "class"], "created_at": "2026-09-27"} {"id": "doc-drupal7-016d7d98a4", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21trigger%21trigger.module/function/trigger_help/7.x", "instruction": "What does the trigger_help function of the Trigger module in Drupal 7 do and what help texts does it generate?", "context": "", "response": "function trigger_help($path, $arg): Implements hook_help() to generate help texts on the pages admin/structure/trigger/{module} and admin/help#trigger, explaining what triggers and actions are, and how to configure them.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-017e4049a9", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21path.inc/function/drupal_get_path_alias/7.x", "instruction": "What does the drupal_get_path_alias function in Drupal 7 do and how does it determine the alias of an internal path?", "context": "", "response": "function drupal_get_path_alias($path = NULL, $path_language = NULL): Given a Drupal internal path, returns the alias set by the administrator; if no path is provided, uses the current page's path and looks up its alias via drupal_lookup_path.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-01887e36a9", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21dblog%21dblog.module/function/dblog_init/7.x", "instruction": "What does the dblog_init function in Drupal 7 do?", "context": "", "response": "function dblog_init(): Implements hook_init() and adds the dblog module CSS when on the reports administration page.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-018a991578", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.module/function/image_permission/7.x", "instruction": "What does the image_permission() function do when implementing hook_permission() in Drupal 7?", "context": "", "response": "function image_permission(): Implements hook_permission() to define the 'administer image styles' permission that allows creating and modifying image styles for generating modifications such as thumbnails.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0196872371", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_valid_token/7.x", "instruction": "What is the signature and behavior of the drupal_valid_token function in Drupal 7?", "context": "", "response": "function drupal_valid_token($token, $value = '', $skip_anonymous = FALSE): Returns true if the token is valid based on $value, the user session, and the private key; if $skip_anonymous is true and the user is anonymous, always returns true.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-01aaa591d8", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_aggregate_css/7.x", "instruction": "What does the drupal_aggregate_css function in Drupal 7 do?", "context": "", "response": "function drupal_aggregate_css(&$css_groups): Aggregates CSS files and inline content into single files, compresses them by removing comments and unnecessary whitespace, and updates the 'data' property of each group with the result.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-01abe76393", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21modules%21field_sql_storage%21field_sql_storage.module/function/field_sql_storage_field_storage_load/7.x", "instruction": "What does the field_sql_storage_field_storage_load function in Drupal 7 do when implementing hook_field_storage_load()?", "context": "", "response": "function field_sql_storage_field_storage_load($entity_type, $entities, $age, $fields, $options): Loads field values stored in the SQL database for the specified entities, selecting the table based on field age, filtering by entity type, requested fields, available languages, ordering by delta, and respecting cardinality and deletion status.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-01be5e32b6", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21ajax.inc/function/ajax_command_data/7.x", "instruction": "How is an Ajax 'data' command created in Drupal 7 to attach a name-value pair to a selector using jQuery's data cache?", "context": "", "response": "function ajax_command_data($selector, $name, $value): Creates an Ajax 'data' command that instructs the client to attach the name=value pair to the specified selector using jQuery's data cache, returning an array compatible with ajax_render().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02152403ec", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21profile%21profile.module/function/template_preprocess_profile_wrapper/7.x", "instruction": "What does the template_preprocess_profile_wrapper function do in Drupal 7 and what variables does it prepare for the profile-wrapper.tpl.php template?", "context": "", "response": "function template_preprocess_profile_wrapper(&$variables): Initializes current_field as an empty string and, if the second URL argument (arg(1)) exists, assigns it to current_field and adds a theme hook suggestion 'profile_wrapper__' + field.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-021b8558c2", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21search%21search.module/function/template_preprocess_search_block_form/7.x", "instruction": "What does the template_preprocess_search_block_form function do in Drupal?", "context": "", "response": "function template_preprocess_search_block_form(&$variables): processes the search form elements separating hidden ones and building a search array.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02376a2f63", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21dashboard%21dashboard.module/function/theme_dashboard_disabled_block/7.x", "instruction": "What does the theme_dashboard_disabled_block function do in Drupal 7 and what parameter does it receive?", "context": "", "response": "function theme_dashboard_disabled_block($variables): Returns the HTML of disabled blocks for use in the dashboard customization mode.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0243b6af74", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21syslog%21syslog.module/function/syslog_watchdog/7.x", "instruction": "What does the syslog_watchdog function that implements hook_watchdog do in Drupal 7?", "context": "", "response": "function syslog_watchdog(array $log_entry): Sends watchdog entries to the server syslog, opening the connection if necessary and formatting the message according to the syslog_format configuration.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0245a1b40b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupal_placeholder/7.x", "instruction": "What does the drupal_placeholder function do in Drupal 7 and how does it format the text it receives?", "context": "", "response": "function drupal_placeholder($text): wraps plain text in an tag after applying check_plain(), to display it emphasized as a placeholder within a sentence.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02514c7288", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.admin.inc/function/image_style_form_add_validate/7.x", "instruction": "What validation does image_style_form_add_validate perform when adding an effect to an image style in Drupal 7?", "context": "", "response": "function image_style_form_add_validate($form, &$form_state): checks if a new effect has been selected and generates a form error if the value is empty.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-027454a6ca", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/comment_node_insert/7.x", "instruction": "What does the comment_node_insert function do when implementing hook_node_insert() in Drupal 7?", "context": "", "response": "function comment_node_insert($node): Inserts a record into the {node_comment_statistics} table with the newly created node's data, maintaining comment statistics unless disabled with comment_maintain_node_statistics.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02904ed90b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_token_info_alter/7.x", "instruction": "What does hook_token_info_alter() do in Drupal 7 and how does it modify token metadata?", "context": "", "response": "function hook_token_info_alter(&$data): alters the metadata about available tokens and token types, allowing modules to modify the information returned by hook_token_info().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-029bd82dda", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21dblog%21dblog.install/function/dblog_update_7003/7.x", "instruction": "What does the dblog_update_7003 function do in the dblog module?", "context": "", "response": "function dblog_update_7003(): Creates the 'watchdog' table in the database if it does not exist, using the raw schema of the dblog module.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02a3dd0e8d", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21session.inc/function/drupal_session_destroy_uid/7.x", "instruction": "What does the drupal_session_destroy_uid function do in Drupal 7?", "context": "", "response": "function drupal_session_destroy_uid($uid): Removes all active sessions of the given user by uid, provided the current session allows modifications.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02baf9a49e", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21filter%21filter.module/function/filter_formats/7.x", "instruction": "How to get the list of available text formats, optionally filtered by a user's permissions, in Drupal 7?", "context": "", "response": "function filter_formats($account = NULL): Returns an array of text format objects ordered by weight, cached by language, and filtered by user permissions if provided.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02c737b97b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21aggregator%21aggregator.module/function/aggregator_menu/7.x", "instruction": "What does the aggregator_menu function do in Drupal 7 and what menu items does it register?", "context": "", "response": "function aggregator_menu(): Implements hook_menu() and defines the aggregator module's menu items, including feed administration routes, categories, sources, and RSS/OPML callbacks.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02ccb28be4", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21openid%21openid.module/function/openid_verify_assertion_signature/7.x", "instruction": "What does the openid_verify_assertion_signature function do in Drupal 7's OpenID module?", "context": "", "response": "function openid_verify_assertion_signature($service, $association, $response): Verifies the signature of the response received from the OpenID provider and checks that it covers all required fields according to the protocol version (1.1 or 2.0).", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02cd4c2b80", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21file.inc/function/file_unmanaged_copy/7.x", "instruction": "What does the file_unmanaged_copy function do in Drupal 7?", "context": "", "response": "function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXISTS_RENAME): Copies a file to a new location without using the file API, checks source and destination, handles destination existence according to $replace, and returns the new file path or FALSE on failure.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02e0e3e9d9", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.admin.inc/function/image_effect_form_submit/7.x", "instruction": "What does the image_effect_form_submit function do in Drupal 7?", "context": "", "response": "function image_effect_form_submit($form, &$form_state): Saves the image effect changes, displays a success message, and redirects to image style editing.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-02f2261dba", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.module/function/system_authorized_run/7.x", "instruction": "What does the system_authorized_run function do in Drupal 7 and how is it used to run operations with elevated privileges?", "context": "", "response": "function system_authorized_run($callback, $file, $arguments = array(), $page_title = NULL): Prepares and invokes an operation via authorize.php, first calling system_authorized_init and then redirecting with drupal_goto to the authorization URL.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-031cfda540", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/template_preprocess_comment/7.x", "instruction": "What does the Drupal 7 function template_preprocess_comment do that processes variables for the comment.tpl.php template?", "context": "", "response": "function template_preprocess_comment(&$variables): prepares the variables used in comment.tpl.php by extracting the comment, node, author, dates, and other properties for the template.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-035145f1c8", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21filter%21filter.install/function/filter_schema/7.x", "instruction": "What tables does the filter_schema function's hook_schema() implementation define in Drupal 7's Filter module?", "context": "", "response": "function filter_schema(): Defines the schemas for the 'filter', 'filter_format', and 'cache_filter' tables to map filters to text formats and store filtered text cache.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03553aa9fe", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21update%21update.module/function/update_refresh/7.x", "instruction": "What does the update_refresh function in Drupal 7's update module do?", "context": "", "response": "function update_refresh(): loads the necessary include file and then updates the release data by calling _update_refresh().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-035dccec82", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21mail.inc/constant/MAIL_LINE_ENDINGS/7.x", "instruction": "How does Drupal 7 automatically detect appropriate line endings for emails via the MAIL_LINE_ENDINGS constant?", "context": "", "response": "define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') !== FALSE ? \"\\r\\n\" : \"\\n\");: defines MAIL_LINE_ENDINGS as CRLF (\\r\\n) on Windows environments (detected by WINDIR or SERVER_SOFTWARE containing 'Win32') and LF (\\n) on other systems, allowing $conf['mail_line_endings'] to override this value.", "tags": ["api-reference", "constant"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03733e8f4b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.install/function/image_field_schema/7.x", "instruction": "What does the Drupal 7 function image_field_schema do and how does it define the schema for an image field?", "context": "", "response": "function image_field_schema($field): returns an array describing the columns fid, alt, title, width, and height, along with indexes and a foreign key to the file_managed table, implementing hook_field_schema().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-037befa08b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.install/function/system_update_7047/7.x", "instruction": "What does the system_update_7047 function do in a Drupal 7 update?", "context": "", "response": "function system_update_7047(): Normalizes the site_frontpage variable by setting it to the normalized path of the current value.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-038798db92", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21file.inc/function/drupal_dirname/7.x", "instruction": "What does the drupal_dirname function do in Drupal 7 and how does it differ from PHP's dirname()?", "context": "", "response": "function drupal_dirname($uri): Gets the directory name of a given path, properly handling stream wrappers and being compatible with normal paths by falling back to PHP's dirname().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-039fee750e", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/_drupal_bootstrap_page_cache/7.x", "instruction": "What does the _drupal_bootstrap_page_cache method do in Drupal 7?", "context": "", "response": "function _drupal_bootstrap_page_cache(): Attempts to serve a page from cache and sends the X-Drupal-Cache headers indicating whether the resource is cached or not.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03a6ead88a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21mail.inc/function/_drupal_wrap_mail_line/7.x", "instruction": "What does the _drupal_wrap_mail_line function do in Drupal?", "context": "", "response": "function _drupal_wrap_mail_line(&$line, $key, $values): Formats words on a single line with soft breaks for purely quoted or unindented text.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03b1d6f439", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21poll%21poll.install/function/poll_update_7004/7.x", "instruction": "What does the poll_update_7004 function do in Drupal 7?", "context": "", "response": "function poll_update_7004(): Updates the database schema by removing the default value from the chid field in the poll_vote table, defining it as unsigned integer and not null.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03c8459f84", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21field.module/function/_field_extra_fields_pre_render/7.x", "instruction": "What does the _field_extra_fields_pre_render function do in Drupal 7?", "context": "", "response": "function _field_extra_fields_pre_render($elements): Adjusts the weights and visibility of extra (non-field) elements in forms and entity view modes.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03cf82077a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.module/function/image_field_update_instance/7.x", "instruction": "What does the image_field_update_instance function do in Drupal 7 when updating an image field instance?", "context": "", "response": "function image_field_update_instance($instance, $prior_instance): Implements hook_field_update_instance() and manages the default image file when updating an image field instance: saves the new file as permanent, registers its usage, and removes the previous file if it changes; also moves the file if the upload destination changed.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03d4ce90ba", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21filter%21filter.install/function/filter_install/7.x", "instruction": "What does the filter_install function do in Drupal 7?", "context": "", "response": "function filter_install(): Creates a basic plain text format with HTML escape, URL, and line break filters, and sets it as the default fallback format.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03d58f4f2d", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.admin.inc/function/_node_mass_update_helper/7.x", "instruction": "What does the _node_mass_update_helper function do in Drupal 7?", "context": "", "response": "function _node_mass_update_helper($nid, $updates): Loads a node, saves its original state, applies the updates specified in the associative array $updates, saves the node, and returns the updated node object.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-03e165e547", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/_drupal_should_strip_sensitive_headers_on_http_redirect/7.x", "instruction": "When should the _drupal_should_strip_sensitive_headers_on_http_redirect function strip sensitive headers when following a redirect in Drupal 7?", "context": "", "response": "function _drupal_should_strip_sensitive_headers_on_http_redirect($url, $location): Compares the host and scheme of the original URL with the redirect destination to determine whether sensitive headers should be stripped.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-040bac8610", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21trigger%21trigger.module/function/trigger_menu_unassign_access/7.x", "instruction": "How does the trigger_menu_unassign_access function determine in Drupal 7 if a user can unassign triggers?", "context": "", "response": "function trigger_menu_unassign_access(): Checks that the user has the 'administer actions' permission and returns TRUE if there is at least one trigger assignment in the trigger_assignments table, thus allowing unassignment.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0412e27760", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21field.api.php/function/hook_field_storage_pre_load/7.x", "instruction": "What does the hook_field_storage_pre_load function do in Drupal 7?", "context": "", "response": "function hook_field_storage_pre_load($entity_type, $entities, $age, &$skip_fields, $options): Allows modules to load field data before the field storage module does, optionally preventing the Field Storage module from doing so.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0413f9fd9f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/themes%21bartik%21template.php/function/bartik_preprocess_html/7.x", "instruction": "What does the bartik_preprocess_html function of the Bartik theme do in Drupal 7?", "context": "", "response": "function bartik_preprocess_html(&$variables): Adds CSS classes to the classes_array depending on which regions have content (featured, triptych, footer-columns) and includes conditional stylesheets for Internet Explorer 6 and 7.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04190c835b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/comment_form_node_type_form_alter/7.x", "instruction": "What does the comment_form_node_type_form_alter function do in Drupal 7?", "context": "", "response": "function comment_form_node_type_form_alter(&$form, $form_state): Implements hook_form_FORM_ID_alter to add a comment settings fieldset to the content type form, including default options for comment status, threads, comments per page, anonymous comments, comment title, form location, and preview.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-043a416588", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/flood_is_allowed/7.x", "instruction": "How is it checked whether a user is authorized to perform a specific event in Drupal?", "context": "", "response": "function flood_is_allowed($name, $threshold, $window = 3600, $identifier = NULL): Checks whether the current user has exceeded the maximum number of allowed times for an event within a given time window, returning TRUE if they can continue and FALSE if they have reached the limit.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-043e097fe6", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21field.api.php/function/hook_field_display_alter/7.x", "instruction": "What is the signature and purpose of hook_field_display_alter in Drupal 7?", "context": "", "response": "function hook_field_display_alter(&$display, $context): Alters the display settings of a field before it is rendered.", "tags": ["api-reference", "function"], "created_at": "2026-09-28"} {"id": "doc-drupal7-044d6cb240", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21locale%21locale.admin.inc/function/theme_locale_languages_configure_form/7.x", "instruction": "How is the HTML of the language configuration form generated in Drupal 7?", "context": "", "response": "function theme_locale_languages_configure_form($variables): Generates the HTML of the language configuration form from the provided variables array.", "tags": ["api-reference", "function"], "created_at": "2026-09-28"} {"id": "doc-drupal7-04501222b9", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21field.info.inc/function/field_info_bundles/7.x", "instruction": "How to get information about existing bundles of an entity type in Drupal 7?", "context": "", "response": "function field_info_bundles($entity_type = NULL): Returns an array of bundles for the specified entity type or, if none provided, all bundles grouped by entity type.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0461f9f362", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/_drupal_parse_response_status/7.x", "instruction": "What does the _drupal_parse_response_status function do in Drupal 7?", "context": "", "response": "function _drupal_parse_response_status($response): Splits the HTTP status line into its components: HTTP version, response code, and reason phrase, returning them in an associative array.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-046a048f4f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_html_id/7.x", "instruction": "What does the drupal_html_id function do in Drupal?", "context": "", "response": "function drupal_html_id($id): prepares a string for use as a valid HTML ID and ensures its uniqueness.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-046ae87604", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7017/7.x", "instruction": "What does the user_update_7017 function do in Drupal 7?", "context": "", "response": "function user_update_7017(): Updates email messages to new tokens and removes the option to send passwords in plain text, warning users.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-047a02a9a0", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.field.inc/function/image_field_formatter_view/7.x", "instruction": "How does the image_field_formatter_view function implement hook_field_formatter_view in Drupal 7?", "context": "", "response": "function image_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display): Generates the renderable array for an image field applying the formatter settings, including possible link and image style.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-048f1ceba9", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21form.inc/function/form_load_include/7.x", "instruction": "What does the form_load_include function do in Drupal 7?", "context": "", "response": "function form_load_include(&$form_state, $type, $module, $name = NULL): ensures that an include file is loaded every time the form is processed, avoiding issues when the form is cached.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0491802308", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_get_region_content/7.x", "instruction": "How do I retrieve the content assigned to a specific region in Drupal?", "context": "", "response": "function drupal_get_region_content($region = NULL, $delimiter = ' '): Gets the content of a theme region, returning it as a string joined by the delimiter if a region is specified, or an array with all regions if $region is NULL.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0497735da1", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21ajax.inc/function/ajax_set_verification_header/7.x", "instruction": "What does the ajax_set_verification_header function do in Drupal 7?", "context": "", "response": "function ajax_set_verification_header(): Sets the HTTP header X-Drupal-Ajax-Token to 1 so ajax.js trusts the response body, preventing Ajax commands from being executed in user-uploaded files.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-049f1e4e9b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/misc%21typo3%21phar-stream-wrapper%21src%21Interceptor%21PharExtensionInterceptor.php/class/PharExtensionInterceptor/7.x", "instruction": "What does the assert method of the PharExtensionInterceptor class do in Drupal?", "context": "", "response": "public function assert($path, $command): Determines whether the file basename has a '.phar' extension.", "tags": ["api-reference", "class"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04a4a062d0", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21mail.inc/function/_drupal_html_to_text_pad/7.x", "instruction": "What does the _drupal_html_to_text_pad function do in Drupal 7 and what is its signature?", "context": "", "response": "function _drupal_html_to_text_pad($text, $pad, $prefix = ''): Removes the last line break, calculates the necessary padding space and adds the prefix and padding character before restoring the final line break.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04a62ef569", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_node_update_index/7.x", "instruction": "What is hook_node_update_index() used for in Drupal 7 and what value does it return?", "context": "", "response": "function hook_node_update_index($node): It is invoked during node search indexing and returns a string with additional node information (such as comments) that is added to the search index.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04a932a0bd", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_entity_info/7.x", "instruction": "What does the user_entity_info function define in the Drupal 7 user module?", "context": "", "response": "function user_entity_info(): Implements hook_entity_info() and returns an array that defines the 'user' entity with its label, controller class, base table, URI and label callbacks, entity keys, bundles, and view modes.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04bcf39cce", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/comment_count_unpublished/7.x", "instruction": "What does the comment_count_unpublished function return in the Drupal 7 comment module?", "context": "", "response": "function comment_count_unpublished(): Returns a menu title that includes the number of unapproved comments.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04de8dfe84", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.install/function/_update_7000_user_role_grant_permissions/7.x", "instruction": "What does the _update_7000_user_role_grant_permissions function do in Drupal 7?", "context": "", "response": "function _update_7000_user_role_grant_permissions($rid, array $permissions, $module): Grants a set of permissions to a role during a database update to version 7000.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04e99db25f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21menu.inc/function/theme_menu_local_action/7.x", "instruction": "How does a theme generate HTML for a local action link in Drupal 7?", "context": "", "response": "function theme_menu_local_action($variables): Returns the HTML of a single local action link wrapping the title in
  • and using l() if there is an href, or the plain title if not.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04ef3fa66e", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21update%21update.fetch.inc/function/_update_fetch_data/7.x", "instruction": "What does the _update_fetch_data function do in Drupal 7 and how does it process queue tasks?", "context": "", "response": "function _update_fetch_data(): Drains the release data download task queue, claiming and processing each item until the maximum time is exhausted or the queue is empty.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04f0c34eab", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_login_submit/7.x", "instruction": "What does the user_login_submit submit handler do in the Drupal 7 login form?", "context": "", "response": "function user_login_submit($form, &$form_state): Loads the user object from the uid in $form_state, sets the redirect to the user account page, and finalizes the login process by calling user_login_finalize.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-04f29aa7e5", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_field_extra_fields/7.x", "instruction": "What does the node_field_extra_fields function return and how does it build the extra fields array for node types in Drupal 7?", "context": "", "response": "function node_field_extra_fields(): Returns an array describing the extra 'title' field for each node type that has a title, including its label, description, and weight (-5) in the form.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0503a1da9b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.install/function/system_update_7011/7.x", "instruction": "What does the function system_update_7011 do in Drupal 7?", "context": "", "response": "function system_update_7011(): Separates the 'bypass node access' permission from the 'administer nodes' permission and assigns it to roles that had the administer nodes permission.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-050933436a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21language.api.php/function/hook_language_negotiation_info/7.x", "instruction": "What does the implementation of hook_language_negotiation_info return in Drupal 7 and what structure does each language negotiation provider have?", "context": "", "response": "function hook_language_negotiation_info(): Defines language negotiation providers and returns an associative array whose keys are provider identifiers and values are arrays with callbacks, weight, language types, name, description, file, configuration, and cache.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-052b593eb1", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21toolbar%21toolbar.module/function/_toolbar_is_collapsed/7.x", "instruction": "How can I determine if the toolbar drawer is collapsed or expanded in Drupal 7?", "context": "", "response": "function _toolbar_is_collapsed(): Returns TRUE when the toolbar drawer is collapsed (according to the 'Drupal_toolbar_collapsed' cookie) and FALSE when it is expanded.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-054a9e7124", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21openid%21openid.module/function/openid_association_request/7.x", "instruction": "What does the openid_association_request function of the OpenID module do in Drupal 7?", "context": "", "response": "function openid_association_request($public): Attempts to create a shared secret with the OpenID Provider.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-05890dc38a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21form.inc/function/_drupal_invalid_token_set_form_error/7.x", "instruction": "What does the _drupal_invalid_token_set_form_error function do in Drupal 7?", "context": "", "response": "function _drupal_invalid_token_set_form_error(): Sets a form error on the 'form_token' token indicating that the form is outdated and the user must reload the page.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0592d393a3", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21taxonomy%21taxonomy.module/function/taxonomy_file_download_access/7.x", "instruction": "What does the taxonomy_file_download_access function do when implementing hook_file_download_access() in Drupal 7?", "context": "", "response": "function taxonomy_file_download_access($field, $entity_type, $entity): Checks if the entity type is taxonomy_term and returns whether the user has content access permission.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-05dea18d9f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21modules%21list%21list.module/function/list_options_list/7.x", "instruction": "What does the list_options_list function do in the list module of Drupal 7?", "context": "", "response": "function list_options_list($field, $instance, $entity_type, $entity): Implements hook_options_list() and returns the allowed values for the field delegating to list_allowed_values().", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-05eff10aba", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21aggregator%21aggregator.admin.inc/function/aggregator_view/7.x", "instruction": "What does the aggregator_view function do in Drupal?", "context": "", "response": "function aggregator_view(): displays the aggregator module administration page and returns an HTML string with the content.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0602c9f67c", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.module/function/image_effect_apply/7.x", "instruction": "What does the image_effect_apply function do in Drupal 7?", "context": "", "response": "function image_effect_apply($image, $effect): Applies an image effect to the image object and returns TRUE on success or FALSE if it cannot perform it.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-060dc621be", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21database%21query.inc/class/Query/7.x", "instruction": "What does the __construct method of the Query class do in Drupal?", "context": "", "response": "public function __construct(DatabaseConnection $connection, $options): Initializes a new Query object with a database connection and query options.", "tags": ["api-reference", "class"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0616571ed2", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21update%21update.module/function/_update_get_cached_available_releases/7.x", "instruction": "What does the _update_get_cached_available_releases function do in Drupal 7?", "context": "", "response": "function _update_get_cached_available_releases(): Returns an array with cached data of all available releases for projects, indexed by the short project name.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-062ee532ac", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_update_form_validate/7.x", "instruction": "What validations does update_manager_update_form_validate perform on the Update Manager update form in Drupal 7?", "context": "", "response": "function update_manager_update_form_validate($form, &$form_state): Validates that at least one project is selected among enabled or disabled ones and sets an error if none is selected.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-063211668a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21update%21update.module/constant/UPDATE_DEFAULT_URL/7.x", "instruction": "What does the UPDATE_DEFAULT_URL constant do in Drupal?", "context": "", "response": "define('UPDATE_DEFAULT_URL', 'https://updates.drupal.org/release-history');: It is the base URL for obtaining available update data for a project.", "tags": ["api-reference", "constant"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06401042e4", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21book%21book.pages.inc/function/book_export/7.x", "instruction": "What does the book_export function do in Drupal 7 and how does it determine the export function based on the requested type?", "context": "", "response": "function book_export($type, $nid): It is a menu callback that loads the node, checks access, and delegates output generation to a helper function book_export_{type} based on the requested format.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-064a6f1f16", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field_ui%21field_ui.api.php/function/hook_field_formatter_settings_summary/7.x", "instruction": "What does the hook_field_formatter_settings_summary function do in Drupal?", "context": "", "response": "function hook_field_formatter_settings_summary($field, $instance, $view_mode): This function returns a short summary of the formatter settings for a specific field, extracting character length information based on the requested display mode.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06533281f3", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.admin.inc/function/system_actions_manage/7.x", "instruction": "What does the function system_actions_manage do in Drupal 7?", "context": "", "response": "function system_actions_manage(): Displays an overview of available and configured actions, building a table with configure and delete operations, and adding a management form.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0656c3d6fa", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21openid%21openid.inc/function/_openid_math_powmod/7.x", "instruction": "What does the function _openid_math_powmod do in the Drupal 7 OpenID module?", "context": "", "response": "function _openid_math_powmod($x, $y, $z): Performs modular exponentiation ($x raised to $y modulo $z) delegating to the available math library (GMP or BCMath) for OpenID cryptographic operations.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06638caea0", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21trigger%21trigger.module/function/trigger_comment_update/7.x", "instruction": "What does the function trigger_comment_update do that implements hook_comment_update in Drupal 7?", "context": "", "response": "function trigger_comment_update($comment): invokes _trigger_comment with the comment and the operation 'comment_update' to execute actions triggered when updating a comment.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-067db706df", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21install.inc/constant/SCHEMA_INSTALLED/7.x", "instruction": "What does the constant SCHEMA_INSTALLED indicate in Drupal 7?", "context": "", "response": "define('SCHEMA_INSTALLED', 0);: indicates that a module has been installed.", "tags": ["api-reference", "constant"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06a290048f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/misc%21typo3%21phar-stream-wrapper%21src%21Resolver%21PharInvocation.php/class/PharInvocation/7.x", "instruction": "What does the confirm method of the PharInvocation class do in Drupal?", "context": "", "response": "public function confirm(): marks the instance as confirmed.", "tags": ["api-reference", "class"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06a80fd71f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21menu.inc/function/_menu_link_find_parent/7.x", "instruction": "What does the function _menu_link_find_parent do in Drupal 7 and how does it determine the parent of a menu link?", "context": "", "response": "function _menu_link_find_parent($menu_link, $parent_candidates = array()): Finds a possible parent for a given menu link, applying heuristics: uses the indicated parent if it exists, searches in the previous hierarchy, or for system links derives the parent from the path.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06c82e4898", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21search%21search.module/function/search_comment_unpublish/7.x", "instruction": "What does the function search_comment_unpublish do in Drupal 7?", "context": "", "response": "function search_comment_unpublish($comment): Re-indexes the node associated with the comment being unpublished by calling search_touch_node.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06cefdf8c5", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/entity_uri/7.x", "instruction": "What does the function entity_uri do in Drupal 7 and what does it return?", "context": "", "response": "function entity_uri($entity_type, $entity): returns an array with keys 'path' and 'options' to construct the entity URI, or NULL if it has no own URI.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06d7515561", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21book%21book.module/function/_book_node_is_removable/7.x", "instruction": "What does the _book_node_is_removable method do in Drupal to determine if a node can be removed from a book?", "context": "", "response": "function _book_node_is_removable($node): The method checks if a node is inside a book and if it is not a top-level page or is a top-level page without children, thus determining if it can be removed.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06d95a989b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21image%21image.module/function/image_default_style_revert/7.x", "instruction": "What does the image_default_style_revert function do in Drupal?", "context": "", "response": "function image_default_style_revert($style): Reverts user-made changes to a default image style, clearing the cache and removing associated database entries.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06e14cfc3b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21form.inc/function/form_pre_render_fieldset/7.x", "instruction": "What does the form_pre_render_fieldset function do in Drupal 7 and how does it process fieldset elements?", "context": "", "response": "function form_pre_render_fieldset($element): Injects group members as real child elements for rendering and reorders children if group members were added.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06ee1a1929", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21database%21pgsql%21install.inc/class/DatabaseTasks_pgsql/7.x", "instruction": "What does the checkEncoding method of the DatabaseTasks_pgsql class do in Drupal?", "context": "", "response": "protected function checkEncoding(): Checks if the database encoding is UTF-8 and, if not, provides an error message with instructions to fix it.", "tags": ["api-reference", "class"], "created_at": "2026-09-27"} {"id": "doc-drupal7-06f4cadcd7", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/comment_form_node_form_alter/7.x", "instruction": "What does the comment_form_node_form_alter function do in Drupal?", "context": "", "response": "function comment_form_node_form_alter(&$form, $form_state): Implements hook_form_BASE_FORM_ID_alter to add a comment settings fieldset to the node creation/edit form, with options to control whether comments are open, closed, or hidden.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0704bd8b91", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21book%21book.module/function/book_prev/7.x", "instruction": "What does the book_prev() function do in Drupal 7 and what does it return when passed a book menu link?", "context": "", "response": "function book_prev($book_link): Traverses the flat book menu to find and return the menu link of the page previous to the specified one, or NULL if found at the beginning of the book.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-071c2ed41d", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21overlay%21overlay.api.php/function/hook_overlay_child_initialize/7.x", "instruction": "What does the hook_overlay_child_initialize hook do and when is it invoked in Drupal 7?", "context": "", "response": "function hook_overlay_child_initialize(): Allows modules to execute code when an overlay child window is initialized, for example to add JavaScript or perform other actions within the overlay.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0726872f32", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/variable_get/7.x", "instruction": "What does the variable_get function do in Drupal 7 and how does it retrieve the value of a persistent variable?", "context": "", "response": "function variable_get($name, $default = NULL): Returns the value of the variable from the $conf array if it exists, or the specified default value otherwise.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07295fb77a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21locale%21locale.install/function/locale_install/7.x", "instruction": "What does the locale_install function do in the locale module of Drupal 7?", "context": "", "response": "function locale_install(): implements hook_install and inserts the English language into the languages table with its default properties during module installation.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-072d5ed33c", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21field.install/function/field_update_7004/7.x", "instruction": "What does the field_update_7004 function do in Drupal 7?", "context": "", "response": "function field_update_7004(): Grants the new \"administer fields\" permission to trusted users who already possess certain core permissions.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07364b8711", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_node_insert/7.x", "instruction": "When is hook_node_insert invoked and what parameter does it receive in Drupal 7?", "context": "", "response": "function hook_node_insert($node): invoked from node_save() after scheduling the database insert, after hook_insert() and field_attach_insert(), receiving the node being created while the transaction has not yet been committed.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07375ee40b", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21trigger%21trigger.module/function/trigger_user_cancel/7.x", "instruction": "What does the trigger_user_cancel function do in Drupal 7 and when does it call _trigger_user?", "context": "", "response": "function trigger_user_cancel($edit, $account, $method): Implements hook_user_cancel() and, when the cancellation method is user_cancel_reassign, triggers the user_delete action through _trigger_user.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0739f5facc", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21content_types.inc/function/node_type_delete_confirm/7.x", "instruction": "What does the node_type_delete_confirm function do in Drupal 7?", "context": "", "response": "function node_type_delete_confirm($form, &$form_state, $type): Displays a confirmation form for deleting a content type and verifies that there are no associated nodes.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07652b1a81", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupal_block_denied/7.x", "instruction": "What does the drupal_block_denied($ip) function do in Drupal 7?", "context": "", "response": "function drupal_block_denied($ip): Checks if an IP is blocked and, if so, sends a 403 Forbidden response with a message and terminates execution.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-076d50c486", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_filters/7.x", "instruction": "What does the user_filters function do in Drupal 7?", "context": "", "response": "function user_filters(): Lists the user administration filters that can be applied, building an array with role, permission, and status filters.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-076f3d29d0", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21update%21update.report.inc/function/theme_update_report/7.x", "instruction": "What does the theme_update_report function return in Drupal 7?", "context": "", "response": "function theme_update_report($variables): Returns the HTML for the project status report.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07750c0e51", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.admin.inc/function/user_filter_form_submit/7.x", "instruction": "What does the user_filter_form_submit function do in Drupal 7 user administration?", "context": "", "response": "function user_filter_form_submit($form, &$form_state): processes user filter form submissions, applying, undoing, resetting, or updating search filters in the session.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0778edd728", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21user%21user.admin.inc/function/user_admin/7.x", "instruction": "What does the user_admin function do in Drupal 7?", "context": "", "response": "function user_admin($callback_arg = ''): Generates the appropriate user administration form (registration, multiple cancellation, or filtered list) based on the argument and POST values.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07b31dfe0c", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21theme.inc/function/drupal_find_theme_templates/7.x", "instruction": "What does the drupal_find_theme_templates function do in Drupal 7?", "context": "", "response": "function drupal_find_theme_templates($cache, $extension, $path): Allows themes and theme engines to easily discover overridden templates by comparing template files against registered theme hooks.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07b487d9ab", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21field%21modules%21text%21text.module/function/text_field_widget_form/7.x", "instruction": "How does the text_field_widget_form function build the form element for a text field widget in Drupal 7?", "context": "", "response": "function text_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element): Generates the form element based on the widget type (textfield, textarea with summary, or textarea) and optionally applies text format if enabled.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07bd0e9f28", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21shortcut%21shortcut.admin.inc/function/theme_shortcut_set_customize/7.x", "instruction": "What does the theme_shortcut_set_customize function do in Drupal 7?", "context": "", "response": "function theme_shortcut_set_customize($variables): returns the HTML of the shortcut set customization form.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07c201bcce", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_deliver_page/7.x", "instruction": "What does the drupal_deliver_page function do in Drupal 7 and how does it determine the delivery callback used?", "context": "", "response": "function drupal_deliver_page($page_callback_result, $default_delivery_callback = NULL): Determines the most appropriate delivery callback (default drupal_deliver_html_page), allows it to be altered via hook_page_delivery_callback_alter, and executes it passing the page callback result to send to the browser in the appropriate format.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07c372693f", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_registry_files_alter/7.x", "instruction": "What does the hook_registry_files_alter hook allow in Drupal 7 and how is it used to modify the list of files the registry processes?", "context": "", "response": "function hook_registry_files_alter(&$files, $modules): Allows adding, removing, or modifying attributes of files that the registry analyzes before processing, typically used to force inclusion of .test files from disabled modules.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07c7e783bb", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21taxonomy%21taxonomy.tokens.inc/function/taxonomy_tokens/7.x", "instruction": "How does taxonomy_tokens() implement hook_tokens() in Drupal 7 to provide term and vocabulary tokens?", "context": "", "response": "function taxonomy_tokens($type, $tokens, array $data = array(), array $options = array()): Replaces 'term' and 'vocabulary' type tokens returning values such as tid, name, description, URL, node count, and parent vocabulary based on the provided data.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-07f6ed0a8a", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_access_acquire_grants/7.x", "instruction": "What does the function node_access_acquire_grants do in Drupal 7?", "context": "", "response": "function node_access_acquire_grants($node, $delete = TRUE): Collects all node access records from hook_node_access_records(), allows them to be altered via hook_node_access_records_alter(), and saves them to the database.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-080455c9dc", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/modules%21system%21system.admin.inc/function/system_theme_settings_submit/7.x", "instruction": "What does the function system_theme_settings_submit do when processing theme configuration form submissions in Drupal 7?", "context": "", "response": "function system_theme_settings_submit($form, &$form_state): Processes theme configuration form submissions, handles logo and favicon uploads saving them to permanent locations, stores paths as public:// URIs, and clears the system cache.", "tags": ["api-reference", "function"], "created_at": "2026-09-27"} {"id": "doc-drupal7-0804b41417", "drupal_version": "7", "source_type": "drupal_api_reference", "source_url": "https://api.drupal.org/api/drupal/includes%21menu.inc/function/theme_menu_local_tasks/7.x", "instruction": "How does the function theme_menu_local_tasks generate HTML for primary and secondary tabs in Drupal 7?", "context": "", "response": "function theme_menu_local_tasks(&$variables): Generates HTML for primary and secondary tabs (local tasks) by rendering the task arrays with list markup (