drupal_set_message
Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.
includes/bootstrap.inc, строка 860
- Версии
- 5
drupal_set_message($message = NULL, $type = 'status')
- 6
drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE)
Выводит сообщение пользователю.
Если функция вызвана без аргументов, то будут возвращены все установленные сообщения (без очистки).
Параметры
$message
Сообщение должно начинаться с заглавной буквы и заканчиваться точкой.
$type
Тип сообщения. Допустимы такие типы:
'status'
'warning'
'error'
$repeat
Если FALSE
и сообщение уже установлено, то сообщение не будет повторяться.
Set a message which reflects the status of the performed operation.
If the function is called with no arguments, this function returns all set messages without clearing them.
Parameters
$message The message should begin with a capital letter and always ends with a period '.'.
$type The type of the message. One of the following values are possible:
- 'status'
- 'warning'
- 'error'
▾ 169 функции вызывают drupal_set_message()
- aggregator_categorize_items_submit in modules/aggregator/aggregator.pages.inc
- Process aggregator_categorize_items form submissions.
- aggregator_form_category_submit in modules/aggregator/aggregator.admin.inc
- Process aggregator_form_category form submissions.
- aggregator_form_feed_submit in modules/aggregator/aggregator.admin.inc
- Process aggregator_form_feed form submissions.
- aggregator_parse_feed in modules/aggregator/aggregator.module
- Parse a feed and store its items.
- aggregator_refresh in modules/aggregator/aggregator.module
- Проверяет фид новостей на наличие новых пунктов.
- aggregator_remove in modules/aggregator/aggregator.module
- Удаляет все элементы из фида.
- batch_example_finished in developer/examples/batch_example.module
- Batch 'finished' callback used by both batch 1 and batch 2
- batch_example_multistep_form_submit in developer/examples/batch_example.module
- block_add_block_form_submit in modules/block/block.admin.inc
- Сохраняет новый блок, созданный пользователем.
- block_admin_configure_submit in modules/block/block.admin.inc
- block_admin_display_form_submit in modules/block/block.admin.inc
- Process main blocks administration form submission.
- block_box_delete_submit in modules/block/block.admin.inc
- Удаляет блок, созданный пользователем.
- blogapi_update_6000 in modules/blogapi/blogapi.install
- Inform users about the new permission.
- blog_page_last in modules/blog/blog.pages.inc
- Коллбэк меню. Показывает страницу Друпал с последними записями в блогах пользователей.
- blog_page_user in modules/blog/blog.pages.inc
- Коллбэк меню. Показывает страницу Друпал с последними записями в блоге данного пользователя.
- book_admin_edit_submit in modules/book/book.admin.inc
- Handle submission of the book administrative page form.
- book_export in modules/book/book.pages.inc
- Menu callback; Generates various representation of a book page and its children.
- book_outline_form_submit in modules/book/book.pages.inc
- Handles book outline form submissions from the outline tab. See alsobook_outline_form()
- book_remove_form_submit in modules/book/book.pages.inc
- Confirm form submit function to remove a node from the book. See alsobook_remove_form()
- color_form_alter in modules/color/color.module
- Реализация hook_form_alter().
- color_scheme_form_submit in modules/color/color.module
- Submit handler for color change form.
- comment_admin_overview_submit in modules/comment/comment.admin.inc
- Process comment_admin_overview form submissions.
- comment_confirm_delete_submit in modules/comment/comment.admin.inc
- Process comment_confirm_delete form submissions.
- comment_controls_submit in modules/comment/comment.module
- Process comment_controls form submissions.
- comment_delete in modules/comment/comment.admin.inc
- Коллбек меню; Подтверждение удаления комментария.
- comment_multiple_delete_confirm in modules/comment/comment.admin.inc
- List the selected comments and verify that the admin really wants to delete them.
- comment_multiple_delete_confirm_submit in modules/comment/comment.admin.inc
- Process comment_multiple_delete_confirm form submissions.
- comment_reply in modules/comment/comment.pages.inc
- This function is responsible for generating a comment reply form. There are several cases that have to be handled, including: replies to comments replies to nodes attempts to reply to nodes that can no longer accept comments respecting access...
- comment_save in modules/comment/comment.module
- Сохраняет новый или измененный комментарий.
- contact_admin_delete_submit in modules/contact/contact.admin.inc
- Process category delete form submission.
- contact_admin_edit_submit in modules/contact/contact.admin.inc
- Process the contact category edit page form submission.
- contact_mail_page in modules/contact/contact.pages.inc
- contact_mail_page_submit in modules/contact/contact.pages.inc
- Process the site-wide contact page form submission.
- contact_mail_user_submit in modules/contact/contact.pages.inc
- Process the personal contact page form submission.
- db_check_setup in includes/database.pgsql.inc
- Проверяет, корректно ли настроена база данных.
- do_search in modules/search/search.module
- Do a query on the full-text search index for a word or words.
- drupal_check_module in includes/install.inc
- Check a module's requirements.
- drupal_error_handler in includes/common.inc
- Журналирует ошибки, так, как это указанно администратором.
- drupal_get_messages in includes/bootstrap.inc
- Return all messages that have been set.
- drupal_mail in includes/mail.inc
- Отправляет сообщения по e-mail.
- drupal_rewrite_settings in includes/install.inc
- Read settings.php into a buffer line by line, changing values specified in $settings array, then over-writing the old settings.php file.
- drupal_test_mysql in includes/install.mysql.inc
- Проверяет, можем ли мы подключиться к MySQL.
- drupal_test_mysqli in includes/install.mysqli.inc
- Проверяет возможность подключения к MySQL.
- drupal_test_pgsql in includes/install.pgsql.inc
- Проверяет возможность соединения с PostgreSQL.
- drupal_verify_profile in includes/install.inc
- Verify a profile for installation.
- file_check_directory in includes/file.inc
- Check that the directory exists and is writable. Directories need to have execute permissions to be considered a directory by FTP servers, etc.
- file_copy in includes/file.inc
- Копирует файл из одного места в другое. Эта мощная функция работает как расширенная версия функции copy(). Непосредственно перед копированием проверяет правильность $source и $dest и возможность чтения/записи. Копирование файла происходить только если $source и $dest не равны.
- file_destination in includes/file.inc
- Determines the destination path for a file depending on how replacement of existing files should be handled.
- file_move in includes/file.inc
- Перемещает файл в новое место.
- file_munge_filename in includes/file.inc
- Munge the filename as needed for security purposes. For instance the file name 'exploit.php.pps' would become 'exploit.php_.pps'.
- file_save_data in includes/file.inc
- Сохраняет строку в заданный новый файл.
- file_save_upload in includes/file.inc
- Сохраняет загруженный файл в новое место. Исходный файл должен быть загружен и обработан.
- file_validate_image_resolution in includes/file.inc
- If the file is an image verify that its dimensions are within the specified maximum and minimum dimensions. Non-image files will be ignored.
- filter_admin_delete in modules/filter/filter.admin.inc
- Menu callback; confirm deletion of a format. See alsofilter_admin_delete_submit()
- filter_admin_delete_submit in modules/filter/filter.admin.inc
- Process filter delete form submission.
- filter_admin_format_form_submit in modules/filter/filter.admin.inc
- Process filter format form submissions.
- filter_admin_order_submit in modules/filter/filter.admin.inc
- Process filter order configuration form submission.
- filter_admin_overview_submit in modules/filter/filter.admin.inc
- form_set_error in includes/form.inc
- Устанавливает ошибку для указанного элемента формы.
- forum_confirm_delete_submit in modules/forum/forum.admin.inc
- Implementation of forms api _submit call. Deletes a forum after confirmation.
- forum_form_submit in modules/forum/forum.admin.inc
- Process forum form and container form submissions.
- hook_nodeapi in developer/hooks/core.php
- Выполняет действия над нодами.
- install_check_requirements in ./install.php
- Check installation requirements and report any errors.
- install_main in ./install.php
- The Drupal installation happens in a series of steps. We begin by verifying that the current environment meets our minimum requirements. We then go on to verify that settings.php is properly configured. From there we connect to the configured database...
- install_tasks in ./install.php
- Tasks performed after the database is initialized.
- locale_languages_configure_form_submit in includes/locale.inc
- Submit function for language negotiation settings.
- locale_languages_delete_form in includes/locale.inc
- User interface for the language deletion confirmation screen.
- locale_languages_delete_form_submit in includes/locale.inc
- Process language deletion submissions.
- locale_languages_overview_form_submit in includes/locale.inc
- Process language overview form submissions, updating existing languages.
- locale_languages_predefined_form_submit in includes/locale.inc
- Process the language addition form submission.
- locale_translate_delete_form_submit in includes/locale.inc
- Process string deletion submissions.
- locale_translate_edit_form in includes/locale.inc
- User interface for string editing.
- locale_translate_edit_form_submit in includes/locale.inc
- Process string editing form submissions.
- locale_translate_import_form_submit in includes/locale.inc
- Process the locale import form submission.
- locale_update_6005 in modules/locale/locale.install
- Change language setting variable of content types.
- menu_delete_menu_confirm_submit in modules/menu/menu.admin.inc
- Delete a custom menu and all items in it.
- menu_edit_item_submit in modules/menu/menu.admin.inc
- Process menu and menu item add/edit form submissions.
- menu_edit_item_validate in modules/menu/menu.admin.inc
- Validate form values for a menu link being added or edited.
- menu_item_delete_form_submit in modules/menu/menu.admin.inc
- Process menu delete form submissions.
- menu_nodeapi in modules/menu/menu.module
- Реализация hook_nodeapi().
- menu_reset_item_confirm_submit in modules/menu/menu.admin.inc
- Process menu reset item form submissions.
- node_access_rebuild in modules/node/node.module
- Rebuild the node access database. This is occasionally needed by modules that make system-wide changes to access levels.
- node_delete in modules/node/node.module
- Удаляет ноду.
- node_form_submit in modules/node/node.pages.inc
- node_help in modules/node/node.module
- Реализация hook_help().
- node_mass_update in modules/node/node.admin.inc
- Make mass update of nodes, changing all nodes in the $nodes array to update them with the field values in $updates.
- node_multiple_delete_confirm_submit in modules/node/node.admin.inc
- node_node_type in modules/node/content_types.inc
- Implementation of hook_node_type().
- node_revision_delete_confirm_submit in modules/node/node.pages.inc
- node_revision_revert_confirm_submit in modules/node/node.pages.inc
- node_teaser_include_verify in modules/node/node.module
- Ensure value of 'teaser_include' checkbox is consistent with other form data.
- node_type_delete_confirm_submit in modules/node/content_types.inc
- Process content type delete confirm submissions.
- node_type_form_submit in modules/node/content_types.inc
- Implementation of hook_form_submit().
- openid_authentication in modules/openid/openid.module
- Authenticate a user or attempt registration.
- openid_authentication_page in modules/openid/openid.pages.inc
- Menu callback; Process an OpenID authentication.
- openid_user in modules/openid/openid.module
- Реализация hook_user().
- openid_user_delete_form_submit in modules/openid/openid.pages.inc
- openid_user_identities in modules/openid/openid.pages.inc
- Menu callback; Manage OpenID identities for the specified user.
- page_get_cache in includes/bootstrap.inc
- Retrieve the current page from the cache.
- path_admin_delete in modules/path/path.module
- Post-confirmation; delete an URL alias.
- path_admin_form_submit in modules/path/path.admin.inc
- Save a new URL alias to the database.
- php_disable in modules/php/php.install
- Реализация hook_disable().
- php_install in modules/php/php.install
- Реализация hook_install().
- poll_vote in modules/poll/poll.module
- Submit handler for processing a vote
- profile_admin_overview_submit in modules/profile/profile.admin.inc
- Submit handler to update changed profile field weights and categories. See alsoprofile_admin_overview()
- profile_field_delete_submit in modules/profile/profile.admin.inc
- Process a field delete form submission.
- profile_field_form_submit in modules/profile/profile.admin.inc
- Process profile_field_form submissions.
- search_admin_settings_validate in modules/search/search.admin.inc
- Validate callback.
- search_wipe_confirm_submit in modules/search/search.admin.inc
- Handler for wipe confirmation
- system_actions_configure_submit in modules/system/system.module
- Обрабатывает переданные значения полей формы system_actions_configure.
- system_actions_delete_form_submit in modules/system/system.module
- Process system_actions_delete form submissions.
- system_action_delete_orphans_post in modules/system/system.module
- Post-deletion operations for deleting action orphans.
- system_clear_cache_submit in modules/system/system.admin.inc
- Submit callback; clear system caches.
- system_main_admin_page in modules/system/system.admin.inc
- Menu callback; Provide the administration overview page.
- system_message_action in modules/system/system.module
- A configurable Drupal action. Sends a message to the current user's screen.
- system_modules_submit in modules/system/system.admin.inc
- Submit callback; handles modules form submission.
- system_modules_uninstall_submit in modules/system/system.admin.inc
- Processes the submitted uninstall form.
- system_modules_uninstall_validate in modules/system/system.admin.inc
- Validates the submitted uninstall form.
- system_requirements in modules/system/system.install
- Test and report Drupal installation requirements.
- system_run_cron in modules/system/system.admin.inc
- Menu callback: run cron manually.
- system_settings_form in modules/system/system.module
- Добавляет к форме кнопки по умолчанию и устанавливает её префикс. См. также system_settings_form_submit()
- system_settings_form_submit in modules/system/system.module
- Execute the system_settings_form.
- system_site_information_settings_validate in modules/system/system.admin.inc
- Validate the submitted site-information form.
- system_themes_form_submit in modules/system/system.admin.inc
- Process system_themes_form form submissions.
- system_theme_settings_submit in modules/system/system.admin.inc
- Process system_theme_settings form submissions.
- system_update_6017 in modules/system/system.install
- Rename settings related to user.module email notifications.
- system_update_6026 in modules/system/system.install
- Display warning about new Update status module.
- system_update_6038 in modules/system/system.install
- Ensure that 'Account' is not used as a Profile category.
- system_update_6045 in modules/system/system.install
- Update blog, book and locale module permissions.
- system_update_6051 in modules/system/system.install
- Create a signature_format column.
- taxonomy_form_term_submit in modules/taxonomy/taxonomy.admin.inc
- Обработчик кнопки "Отправить", формы добавления или обновления термина. См. также taxonomy_form_term()
- taxonomy_form_vocabulary_submit in modules/taxonomy/taxonomy.admin.inc
- Accept the form submission for a vocabulary and save the results.
- taxonomy_term_confirm_delete_submit in modules/taxonomy/taxonomy.admin.inc
- Submit handler to delete a term after confirmation. See alsotaxonomy_term_confirm_delete()
- taxonomy_vocabulary_confirm_delete_submit in modules/taxonomy/taxonomy.admin.inc
- Submit handler to delete a vocabulary after confirmation. See alsotaxonomy_vocabulary_confirm_delete()
- taxonomy_vocabulary_confirm_reset_alphabetical_submit in modules/taxonomy/taxonomy.admin.inc
- Submit handler to reset a vocabulary to alphabetical order after confirmation. See alsotaxonomy_vocabulary_confirm_reset_alphabetical()
- theme_install_page in includes/theme.maintenance.inc
- Generate a themed installation page.
- theme_node_preview in modules/node/node.pages.inc
- Отображает предпросмотр ноды во время ее создания и редактирования.
- theme_update_page in includes/theme.maintenance.inc
- Generate a themed update page.
- trigger_assign_form_submit in modules/trigger/trigger.admin.inc
- Submit function for trigger_assign_form().
- trigger_unassign_submit in modules/trigger/trigger.admin.inc
- update_check_requirements in ./update.php
- Check update requirements and report any errors.
- update_help in modules/update/update.module
- Реализация hook_help().
- update_manual_status in modules/update/update.fetch.inc
- Callback to manually check the update status without cron.
- user_admin_access_check_submit in modules/user/user.admin.inc
- user_admin_access_delete_confirm_submit in modules/user/user.admin.inc
- user_admin_access_form_submit in modules/user/user.admin.inc
- Submit callback for user_admin_access_form().
- user_admin_account_submit in modules/user/user.admin.inc
- Submit the user administration update form.
- user_admin_perm_submit in modules/user/user.admin.inc
- user_admin_role_submit in modules/user/user.admin.inc
- user_confirm_delete_submit in modules/user/user.pages.inc
- Submit function for the confirm form for user deletion.
- user_edit_form in modules/user/user.module
- user_edit_submit in modules/user/user.pages.inc
- user_external_login_register in modules/user/user.module
- Helper function for authentication modules. Either login in or registers the current user, based on username. Either way, the global $user object is populated based on $name.
- user_multiple_delete_confirm_submit in modules/user/user.module
- user_pass_reset in modules/user/user.pages.inc
- Menu callback; process one time login link and redirects to the user page on success.
- user_pass_submit in modules/user/user.pages.inc
- user_profile_form_submit in modules/user/user.pages.inc
- Submit function for the user account and profile editing form.
- user_register_submit in modules/user/user.module
- Обработчик формы регистрации пользователя.
- _batch_do in includes/batch.inc
- Do one pass of execution and inform back the browser about progression (used for JavaScript-mode only).
- _block_rehash in modules/block/block.module
- Update the 'blocks' DB table with the blocks currently exported by modules.
- _locale_batch_language_finished in includes/locale.inc
- Finished callback of language addition locale import batch. Inform the user of translation files imported.
- _locale_batch_system_finished in includes/locale.inc
- Finished callback of system page locale import batch. Inform the user of translation files imported.
- _locale_import_message in includes/locale.inc
- Sets an error message occurred during locale file parsing.
- _locale_import_parse_plural_forms in includes/locale.inc
- Parses a Plural-Forms entry from a Gettext Portable Object file header
- _locale_import_po in includes/locale.inc
- Parses Gettext Portable Object file information and inserts into database
- _menu_site_is_offline in includes/menu.inc
- Проверяет, находится ли сайт в автономном режиме "на обслуживании".
- _module_build_dependencies in includes/module.inc
- Find dependencies any level deep and fill in dependents information too.
- _node_access_rebuild_batch_finished in modules/node/node.module
- Post-processing for node_access_rebuild_batch.
- _node_mass_update_batch_finished in modules/node/node.admin.inc
- Node Mass Update Batch 'finished' callback.
Код
<?php
function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
if ($message) {
if (!isset($_SESSION['messages'])) {
$_SESSION['messages'] = array();
}
if (!isset($_SESSION['messages'][$type])) {
$_SESSION['messages'][$type] = array();
}
if ($repeat || !in_array($message, $_SESSION['messages'][$type])) {
$_SESSION['messages'][$type][] = $message;
}
}
// messages not set when DB connection fails
return isset($_SESSION['messages']) ? $_SESSION['messages'] : NULL;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии