includes/theme.inc, строка 577
- 5 – 6
theme()
Генерирует темизированный вывод.
Все запросы к хукам темизации должны идти через эту функцию. Она рассматривает запрос и направляет его к соответствующей функции темизации. Настройки темы проверяются, чтобы определить, какую реализацию использовать, так как это может быть функция или шаблон.
-
Если реализация — функция, она исполняется и ее возвращенное значение передается дальше. Функция может быть переопределена в такой очередности:
theme_HOOK()
Реализация функции темизации по-умолчанию. Чаще всего реализуется в модулях или в ядре.
ENGINE_HOOK()
Переопределяет предыдущую реализацию. Чаще всего используется в темах и ядре.
THEME_HOOK()
Переопределяет все предыдущие реализации. Используется в темах.
-
Если реализация — шаблон, то поступающие в
theme()
переменные помещаются в ассоциативный массив $variables
. Затем, этот массив может быть изменен одной из функций предварительной обработки (в следующем порядке):
template_preprocess(&$variables)
Устанавливает набор переменных по-умолчанию для всех шаблонов.
template_preprocess_HOOK(&$variables)
Это первый предварительный обработчик вызываемый для конкретного хука темизации. Он должен быть реализован в модуле, регистрирующем обработчик.
MODULE_preprocess(&$variables)
Обработчик будет вызываться для всех шаблонов. Должен использоваться только при реальной необходимости, т.к. может служить причиной замедления работы сайта. Назначение такое же как и у template_preprocess()
.
MODULE_preprocess_HOOK(&$variables)
Этот обработчик создан для модулей, которые должны изменять, удалять или добавлять новые переменные в хуки темизации, зарегистрированные другими модулями. Напрмиер, если модуль foo
хочет изменить переменную $submitted
в шаблоне ноды (хук темизации node
), в модуле нужно создать функцию обработки foo_preprocess_node(&$variables)
, в которой производить действия над $variables['submitted']
.
ENGINE_engine_preprocess(&$variables)
Этот обработчик должен реализовываться только движками тем и предназначен для того же, что и MODULE_preprocess()
.
ENGINE_engine_preprocess_HOOK(&$variables)
То же, что и предыдущий, но вызывается только для определенного хука темизации.
ENGINE_preprocess(&$variables)
Этот обработчик задуман для использования темами определенного движка тем. Так как обработчик не закрепляется за темой, он может быть с легкостью использован повторно для других тем. Однако, следует быть осторожным, чтобы не нарваться на ошибки двойной реализации функций в под-темах. Например, PHPTemplate (движок по-умолчанию) загружает в под-темах их собственный файл template.php в дополнение к файлу из родительской темы. Это повышает риск того, что одна и та же функция может быть объявлена два раза. Проще всего избежать этого, используя в под-темах только обработчики, основанные на названии тем.
ENGINE_preprocess_HOOK(&$variables)
То же, что и предыдущий, но вызывается только для определенного хука темизации.
THEME_preprocess(&$variables)
Этот обработчик используется исключительно в темах. Предназначен для тех же целей, что и ENGINE_preprocess()
.
THEME_preprocess_HOOK(&$variables)
То же, что и предыдущий, но вызывается только для определенного хука темизации.
Существует две специальные переменные, которые могут устанавливаться предварительными обработчиками:
'template_file'
and 'template_files'
. В этих переменных содержится массив вероятных названий файлов шаблонов. В финальном обработчике этот список будет просматриваться с конца, и если такой шаблон существует, он будет использован. Например:
function phptemplate_preprocess_node(&$variables) {
// ...
// В списке потенциальных шаблонов уже присуствует 'node',
// так как это название хука темизации
$variables['template_files'][] = 'node-special';
$variables['template_files'][] = 'node-very-special';
// Если node-very-special.tpl.php будет присутствовать в папке темы,
// он и будет использован вместо стандартного. Если нет, то node-special.tpl.php.
// Если и его не окажется в папке темы, то будет использован шаблон по-умолчанию node.tpl.php
}
Обратите внимание, 'template_file'
имеет больший приоритет, чем 'template_files'
.
Параметры
$hook
Название хука темизации. Может быть массивом (в этом случае, будет вызван первый хук, который имеет реализацию. Используется для обеспечения "запасного варианта", чтобы если одна специальная функция темизации не существует, вызывалась другая, более универсальная).
...
Дополнительные аргументы функции/хука темизации.
Возвращаемое значение
Конечный HTML код вывода.
Generate the themed output.
All requests for theme hooks must go through this function. It examines
the request and routes it to the appropriate theme function. The theme
registry is checked to determine which implementation to use, which may
be a function or a template.
If the implementation is a function, it is executed and its return value
passed along.
If the implementation is a template, the arguments are converted to a
$variables array. This array is then modified by the module implementing
the hook, theme engine (if applicable) and the theme. The following
functions may be used to modify the $variables array. They are processed in
this order when available:
- template_preprocess(&$variables)
This sets a default set of variables for all template implementations.
- template_preprocess_HOOK(&$variables)
This is the first preprocessor called specific to the hook; it should be
implemented by the module that registers it.
- MODULE_preprocess(&$variables)
This will be called for all templates; it should only be used if there
is a real need. It's purpose is similar to template_preprocess().
- MODULE_preprocess_HOOK(&$variables)
This is for modules that want to alter or provide extra variables for
theming hooks not registered to itself. For example, if a module named
"foo" wanted to alter the $submitted variable for the hook "node" a
preprocess function of foo_preprocess_node() can be created to intercept
and alter the variable.
- ENGINE_engine_preprocess(&$variables)
This function should only be implemented by theme engines and exists
so that it can set necessary variables for all hooks.
- ENGINE_engine_preprocess_HOOK(&$variables)
This is the same as the previous function, but it is called for a single
theming hook.
- ENGINE_preprocess(&$variables)
This is meant to be used by themes that utilize a theme engine. It is
provided so that the preprocessor is not locked into a specific theme.
This makes it easy to share and transport code but theme authors must be
careful to prevent fatal re-declaration errors when using sub-themes that
have their own preprocessor named exactly the same as its base theme. In
the default theme engine (PHPTemplate), sub-themes will load their own
template.php file in addition to the one used for its parent theme. This
increases the risk for these errors. A good practice is to use the engine
name for the base theme and the theme name for the sub-themes to minimize
this possibility.
- ENGINE_preprocess_HOOK(&$variables)
The same applies from the previous function, but it is called for a
specific hook.
- THEME_preprocess(&$variables)
These functions are based upon the raw theme; they should primarily be
used by themes that do not use an engine or by sub-themes. It serves the
same purpose as ENGINE_preprocess().
- THEME_preprocess_HOOK(&$variables)
The same applies from the previous function, but it is called for a
specific hook.
There are two special variables that these hooks can set:
'template_file' and 'template_files'. These will be merged together
to form a list of 'suggested' alternate template files to use, in
reverse order of priority. template_file will always be a higher
priority than items in template_files.
theme() will then look for these
files, one at a time, and use the first one
that exists.
Parameters
$hook
The name of the theme function to call. May be an array, in which
case the first hook that actually has an implementation registered
will be used. This can be used to choose 'fallback' theme implementations,
so that if the specific theme hook isn't implemented anywhere, a more
generic one will be used. This can allow themes to create specific theme
implementations for named objects.
...
Additional arguments to pass along to the theme function.
Return value
An HTML string that generates the themed output.
- aggregator_block in modules/aggregator/aggregator.module
- Реализация hook_block().
- aggregator_categorize_items in modules/aggregator/aggregator.pages.inc
- Form builder; build the page list form.
- aggregator_page_categories in modules/aggregator/aggregator.pages.inc
- Коллбэк меню; показывает все категории, используемые аггрегатором.
- aggregator_page_opml in modules/aggregator/aggregator.pages.inc
- Коллбэк меню; генерирует представление OPML из всех фидов.
- aggregator_page_rss in modules/aggregator/aggregator.pages.inc
- Коллбэк меню. Генерирует фид из материалов аггергатора или категорий в формате RSS 0.92.
- aggregator_page_source in modules/aggregator/aggregator.pages.inc
- Menu callback; displays all the items captured from a particular feed.
- aggregator_page_sources in modules/aggregator/aggregator.pages.inc
- Коллбэк меню; показывает все фиды, используемые аггрегатором.
- aggregator_view in modules/aggregator/aggregator.admin.inc
- Отображает страницу администрирования агрегатора.
- blog_block in modules/blog/blog.module
- Реализация hook_block().
- blog_page_last in modules/blog/blog.pages.inc
- Коллбэк меню. Показывает страницу Друпал с последними записями в блогах пользователей.
- blog_page_user in modules/blog/blog.pages.inc
- Коллбэк меню. Показывает страницу Друпал с последними записями в блоге данного пользователя.
- book_admin_overview in modules/book/book.admin.inc
- Возвращает административный краткий обзор всех книг.
- book_block in modules/book/book.module
- Реализация hook_block().
- book_export_html in modules/book/book.pages.inc
- This function is called by book_export() to generate HTML for export.
- book_nodeapi in modules/book/book.module
- Implementation of hook_nodeapi().
- book_node_export in modules/book/book.module
- Generates printer-friendly HTML for a node.
See alsobook_export_traverse()
- book_render in modules/book/book.pages.inc
- Menu callback; prints a listing of all books.
- chameleon_comment in themes/chameleon/chameleon.theme
- chameleon_node in themes/chameleon/chameleon.theme
- chameleon_page in themes/chameleon/chameleon.theme
- color_form_alter in modules/color/color.module
- Реализация hook_form_alter().
- comment_admin_overview in modules/comment/comment.admin.inc
- Конструктор формы; генерирует форму с кратким содержанием комментариев для администратора.
- comment_block in modules/comment/comment.module
- Реализация hook_block().
- comment_form in modules/comment/comment.module
- Создаёт базовую форму для комментирования, которая будет добавлена к странице с нодой или отображена на отдельной странице.
- comment_form_add_preview in modules/comment/comment.module
- Конструктор формы; Формирует и проверяет форму предпросмотра комментария.
- comment_form_box in modules/comment/comment.module
- Тема формы блока комментария.
- comment_link in modules/comment/comment.module
- Реализация hook_link().
- comment_links in modules/comment/comment.module
- Формирует управляющие ссылки для комментариев (редактировать, ответить, удалить) на основе прав доступа для текущего пользователя.
- comment_render in modules/comment/comment.module
- Отображает комментарии.
- 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...
- contact_admin_categories in modules/contact/contact.admin.inc
- Categories/list tab.
- contact_mail_user in modules/contact/contact.pages.inc
- dblog_event in modules/dblog/dblog.admin.inc
- Коллбэк меню; отображает подробности записи журнала системы.
- dblog_overview in modules/dblog/dblog.admin.inc
- Коллбэк меню; выводит логи сообщений.
- dblog_top in modules/dblog/dblog.admin.inc
- Menu callback; generic function to display a page of the most frequent
dblog events of a specified type.
- drupal_access_denied in includes/common.inc
- Генерирует ошибку 403 если для просмотра страницы недостаточно прав.
- drupal_add_feed in includes/common.inc
- Добавляет URL фида для текущей страницы.
- drupal_not_found in includes/common.inc
- Генерирует ошибку 404 (страница не найдена) если запрос не удалось обработать.
- drupal_render in includes/common.inc
- Формирует HTML-код из структурированного массива.
- drupal_site_offline in includes/common.inc
- Generates a site off-line message.
- filter_admin_format_form in modules/filter/filter.admin.inc
- Generate a filter format form.
See alsofilter_admin_format_form_validate()
- filter_filter_tips in modules/filter/filter.module
- Реализация hook_filter_tips().
- filter_form in modules/filter/filter.module
- Generate a selector for choosing a format in a form.
See alsofilter_form_validate()
- filter_tips_long in modules/filter/filter.pages.inc
- Menu callback; show a page with long filter tips.
- forum_block in modules/forum/forum.module
- Реализация hook_block().
- forum_nodeapi in modules/forum/forum.module
- Implementation of hook_nodeapi().
- forum_page in modules/forum/forum.pages.inc
- Menu callback; prints a forum listing.
- help_page in modules/help/help.admin.inc
- Menu callback; prints a page listing general help for a module.
- hook_nodeapi in developer/hooks/core.php
- Выполняет действия над нодами.
- hook_search in developer/hooks/core.php
- Определяет пользовательскую функцию поиска.
- hook_view in developer/hooks/node.php
- Показывает ноду.
- install_already_done_error in ./install.php
- Show an error page when Drupal has already been installed.
- install_change_settings in ./install.php
- Configure and rewrite settings.php.
- 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_no_profile_error in ./install.php
- Show an error page when there are no profiles available.
- install_select_locale in ./install.php
- Allow admin to select which locale to use for the current profile.
- install_select_profile in ./install.php
- Allow admin to select which profile to install.
- locale_block in modules/locale/locale.module
- Реализация hook_block(). Отображает переключатель языков. Ссылки могут быть предоставлены другими модулями.
- locale_translate_overview_screen in includes/locale.inc
- Overview screen for translations.
- menu_get_active_help in includes/menu.inc
- Возвращает справку связанную с активизированным пунктом меню.
- menu_local_tasks in includes/menu.inc
- Собирает локальные задачи (вкладки) для заданного уровня.
- menu_overview_page in modules/menu/menu.admin.inc
- Menu callback which shows an overview page of all the custom menus and their descriptions.
- menu_tree_output in includes/menu.inc
- Возвращает сформированное для вывода дерево меню.
- multipage_form_example_view in developer/examples/multipage_form_example.module
- Реализация hook_view().
- nodeapi_example_nodeapi in developer/examples/nodeapi_example.module
- Реализация hook_nodeapi().
- node_add_page in modules/node/node.pages.inc
- node_admin_nodes in modules/node/node.admin.inc
- Form builder: Builds the node administration overview.
- node_block in modules/node/node.module
- Реализация hook_block().
- node_example_view in developer/examples/node_example.module
- Реализация hook_view().
- node_overview_types in modules/node/content_types.inc
- Displays the content type admin overview page.
- node_page_default in modules/node/node.module
- Menu callback; Generate a listing of promoted nodes.
- node_preview in modules/node/node.pages.inc
- Generate a node preview.
- node_revision_overview in modules/node/node.pages.inc
- Generate an overview table of older revisions of a node.
- node_search in modules/node/node.module
- Реализация hook_search().
- node_title_list in modules/node/node.module
- Gather a listing of links to nodes.
- node_type_form in modules/node/content_types.inc
- Generates the node type editing form.
- node_view in modules/node/node.module
- Генерирует вывод ноды.
- openid_form_alter in modules/openid/openid.module
- Implementation of hook_form_alter : adds OpenID login to the login forms.
- openid_user_identities in modules/openid/openid.pages.inc
- Menu callback; Manage OpenID identities for the specified user.
- page_example_baz in developer/examples/page_example.module
- Более сложная реализация коллбэка меню для отображения страницы, которая принимает аргументы.
- path_admin_overview in modules/path/path.admin.inc
- Return a listing of all defined URL aliases.
When filter key passed, perform a standard search on the given key,
and return the list of matching URL aliases.
- phptemplate_comment_submitted in themes/garland/template.php
- phptemplate_node_submitted in themes/garland/template.php
- poll_choice_js in modules/poll/poll.module
- Коллбэк меню для AHAH добавления пунктов.
- poll_page in modules/poll/poll.pages.inc
- Menu callback to provide a simple list of all polls available.
- poll_view_results in modules/poll/poll.module
- Generates a graphical representation of the results of a poll.
- poll_votes in modules/poll/poll.pages.inc
- Callback for the 'votes' tab for polls you can see other votes on
- profile_block in modules/profile/profile.module
- Реализация hook_block().
- profile_browse in modules/profile/profile.pages.inc
- Menu callback; display a list of user information.
- search_data in modules/search/search.module
- Запускает стандартный поиск по заданным ключам и возвращает форматированный результат.
- search_view in modules/search/search.pages.inc
- Menu callback; presents the search form and/or search results.
- statistics_access_log in modules/statistics/statistics.admin.inc
- Menu callback; Displays recent page accesses.
- statistics_node_tracker in modules/statistics/statistics.pages.inc
- statistics_recent_hits in modules/statistics/statistics.admin.inc
- Menu callback; presents the 'recent hits' page.
- statistics_top_pages in modules/statistics/statistics.admin.inc
- Menu callback; presents the 'top pages' page.
- statistics_top_referrers in modules/statistics/statistics.admin.inc
- Menu callback; presents the 'referrer' page.
- statistics_top_visitors in modules/statistics/statistics.admin.inc
- Menu callback; presents the 'top visitors' page.
- statistics_user_tracker in modules/statistics/statistics.pages.inc
- syslog_watchdog in modules/syslog/syslog.module
- system_actions_manage in modules/system/system.module
- Menu callback. Display an overview of available and configured actions.
- system_admin_by_module in modules/system/system.admin.inc
- Menu callback; prints a listing of admin tasks for each installed module.
- system_admin_menu_block_page in modules/system/system.admin.inc
- Представляет единый блок из меню администрирования как страницу. Эта функция часто является "местом назначения" для таких блоков.(прим. переводчика - видимо имеется в виду, что корневой элемент меню часто имеет параметром "page callback" данную функцию, она используется для показа таких элементов, имеющих дочерние). Например, путь 'admin/content/types' должен иметь "место назначения" чтобы соответствовать системе меню Drupal, однако слишком много информации может быть скрыто, поэтому мы указываем содержимое блока.
- system_batch_page in modules/system/system.admin.inc
- Default page callback for batches.
- system_block in modules/system/system.module
- Реализация hook_block().
- system_logging_overview in modules/system/system.admin.inc
- Menu callback; Menu page for the various logging options.
- system_main_admin_page in modules/system/system.admin.inc
- Menu callback; Provide the administration overview page.
- system_modules_confirm_form in modules/system/system.admin.inc
- Display confirmation form for dependencies.
- system_modules_uninstall_confirm_form in modules/system/system.admin.inc
- Confirm uninstall of selected modules.
- system_settings_overview in modules/system/system.admin.inc
- Menu callback; displays a module's settings page.
- system_status in modules/system/system.admin.inc
- Menu callback: displays the site status report. Can also be used as a pure check.
- system_themes_form in modules/system/system.admin.inc
- Menu callback; displays a listing of all themes.
See alsosystem_themes_form_submit()
- system_theme_select_form in modules/system/system.module
- Returns a fieldset containing the theme select form.
- t in includes/common.inc
- Переводит строку на заданный язык или язык страницы.
- tablesort_header in includes/tablesort.inc
- Format a column header.
- taxonomy_render_nodes in modules/taxonomy/taxonomy.module
- Принимает результат вызова pager_query(), такой как, например, возвращает taxonomy_select_nodes(), и форматирует каждую ноду вместе с листалкой страниц.
- taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
- Коллбэк меню; отображает все ноды, связанные с термином таксономии.
- template_preprocess_aggregator_feed_source in modules/aggregator/aggregator.pages.inc
- Process variables for aggregator-feed-source.tpl.php.
See alsoaggregator-feed-source.tpl.php
- template_preprocess_aggregator_summary_items in modules/aggregator/aggregator.pages.inc
- Process variables for aggregator-summary-items.tpl.php.
See alsoaggregator-summary-item.tpl.php
- template_preprocess_aggregator_wrapper in modules/aggregator/aggregator.pages.inc
- Process variables for aggregator-wrapper.tpl.php.
See alsoaggregator-wrapper.tpl.php
- template_preprocess_comment in modules/comment/comment.module
- Process variables for comment.tpl.php.
See alsocomment.tpl.php
- template_preprocess_comment_folded in modules/comment/comment.module
- Process variables for comment-folded.tpl.php.
See alsocomment-folded.tpl.php
- template_preprocess_forums in modules/forum/forum.module
- Process variables for forums.tpl.php
- template_preprocess_forum_list in modules/forum/forum.module
- Process variables to format a forum listing.
- template_preprocess_forum_submitted in modules/forum/forum.module
- Process variables to format submission info for display in the forum list and topic list.
- template_preprocess_forum_topic_list in modules/forum/forum.module
- Preprocess variables to format the topic listing.
- template_preprocess_maintenance_page in includes/theme.maintenance.inc
- The variables generated here is a mirror of template_preprocess_page().
This preprocessor will run it's course when theme_maintenance_page() is
invoked. It is also used in theme_install_page() and theme_update_page() to
keep all the variables...
- template_preprocess_node in includes/theme.inc
- Обрабатывает переменные для node.tpl.php
- template_preprocess_page in includes/theme.inc
- Обрабатывает переменные для page.tpl.php
- template_preprocess_poll_results in modules/poll/poll.module
- Preprocess the poll_results theme hook.
- template_preprocess_profile_block in modules/profile/profile.module
- Process variables for profile-block.tpl.php.
- template_preprocess_profile_listing in modules/profile/profile.module
- Process variables for profile-listing.tpl.php.
- template_preprocess_search_results in modules/search/search.pages.inc
- Process variables for search-results.tpl.php.
- template_preprocess_user_picture in modules/user/user.module
- Process variables for user-picture.tpl.php.
- theme_admin_page in modules/system/system.admin.inc
- Форматирует административную страницу для отображения.
- theme_aggregator_block_item in modules/aggregator/aggregator.module
- Format an individual feed item for display in the block.
- theme_aggregator_categorize_items in modules/aggregator/aggregator.pages.inc
- Theme the page list form for assigning categories.
- theme_blocks in includes/theme.inc
- Возвращает набор блоков, доступных для текущего пользователя.
- theme_book_admin_table in modules/book/book.admin.inc
- Theme function for the book administration page form.
See alsobook_admin_table()
- theme_checkbox in includes/form.inc
- Темизирует чекбокс.
- theme_checkboxes in includes/form.inc
- Изменяет стиль сразу нескольких чекбоксов.
- theme_comment_admin_overview in modules/comment/comment.admin.inc
- Темизирует форму комментирования администратора.
- theme_comment_block in modules/comment/comment.module
- Returns a formatted list of recent comments to be displayed in the comment block.
- theme_comment_controls in modules/comment/comment.module
- Темизирует область(бокс) контроля комментариев, где пользователь может изменить отображение по умолчанию и упорядочить их показ.
- theme_comment_flat_collapsed in modules/comment/comment.module
- Темизирует комментарий в сжатом виде.
- theme_comment_flat_expanded in modules/comment/comment.module
- Темизирует комментарий в раскрытом виде.
- theme_comment_submitted in modules/comment/comment.module
- Темизирует информацию об авторстве комментария.
- theme_comment_thread_collapsed in modules/comment/comment.module
- Темизирует комментарии в свёрнутом виде.
- theme_comment_thread_expanded in modules/comment/comment.module
- Темизирует комментарии в развёрнутом виде.
- theme_comment_view in modules/comment/comment.module
- Темизировать блок с единичным комментарием
- theme_date in includes/form.inc
- Форматирует дату выбранного элемента.
- theme_feed_icon in includes/theme.inc
- Возвращает код, который выдает иконку новостной ленты.
- theme_file in includes/form.inc
- Форматирует поле загрузки файла.
- theme_filter_admin_order in modules/filter/filter.admin.inc
- Темизирует форму конфигурации порядка фильтров.
- theme_filter_admin_overview in modules/filter/filter.admin.inc
- Theme the admin overview form.
- theme_install_page in includes/theme.maintenance.inc
- Generate a themed installation page.
- theme_item in includes/form.inc
- Возвращает темизированный элемент формы.
- theme_locale_languages_overview_form in includes/locale.inc
- Темизирует форму обзора языков сайта.
- theme_menu_overview_form in modules/menu/menu.admin.inc
- Theme the menu overview form into a table.
- theme_node_admin_nodes in modules/node/node.admin.inc
- Theme node administration overview.
- theme_node_list in modules/node/node.module
- Форматирует список ссылок на ноды.
- theme_node_search_admin in modules/node/node.module
- Theme the content ranking part of the search settings admin page.
- theme_node_submitted in modules/node/node.module
- Формат представления "Опубликовано _пользователем_ в _дата/время_" для каждой ноды
- theme_pager in includes/pager.inc
- Темизирует "листалку" страниц.
- theme_pager_first in includes/pager.inc
- Форматирует ссылку "первая страница".
- theme_pager_last in includes/pager.inc
- Форматирует ссылку "последняя страница".
- theme_pager_next in includes/pager.inc
- Форматирует ссылку "следующая страница".
- theme_pager_previous in includes/pager.inc
- Форматирует ссылку "предыдущая страница".
- theme_password in includes/form.inc
- Форматирует поле ввода пароля.
- theme_password_confirm in includes/form.inc
- Форматирует пункт подтверждения пароля.
- theme_phonenumber in developer/examples/example_element.module
- Theme function to format the output.
- theme_poll_choices in modules/poll/poll.module
- Theme the admin poll form for choices.
- theme_profile_admin_overview in modules/profile/profile.admin.inc
- Theme the profile field overview into a drag and drop enabled table.
See alsoprofile_admin_overview()
- theme_radio in includes/form.inc
- Форматирует одиночный переключатель (радио-кнопку) для их группы.
- theme_radios in includes/form.inc
- Форматирует сразу несколько радио-кнопок.
- theme_select in includes/form.inc
- Format a dropdown menu or scrolling selection box.
- theme_submit in includes/form.inc
- Форматирует кнопку отправки формы.
- theme_system_admin_by_module in modules/system/system.admin.inc
- Темизирует вывод страницы администрирования по модулям.
- theme_system_modules in modules/system/system.admin.inc
- Темизирует форму модулей.
- theme_system_modules_uninstall in modules/system/system.admin.inc
- Темизирует таблицу отключенных на данный момент модулей.
- theme_system_powered_by in modules/system/system.module
- Форматирует текст надписи "Powered by Drupal" (Создано на Друпале).
- theme_system_themes_form in modules/system/system.admin.inc
- Theme function for the system themes form.
- theme_system_theme_select_form in modules/system/system.admin.inc
- Темизирует форму выбора темы.
- theme_tablesort_indicator in includes/theme.inc
- Возвращает темизированную иконку сортировки колонки таблицы.
- theme_taxonomy_overview_terms in modules/taxonomy/taxonomy.admin.inc
- Темизирует обзор терминов как сортируемый список.
- theme_taxonomy_overview_vocabularies in modules/taxonomy/taxonomy.admin.inc
- Темизирует обзор словарей как сортируемый список.
- theme_taxonomy_term_select in modules/taxonomy/taxonomy.module
- Format the selection field for choosing terms
(by deafult the default selection field is used).
- theme_textarea in includes/form.inc
- Форматирует многострочное текстовое поле ввода для формы.
- theme_textfield in includes/form.inc
- Форматирует однострочное текстовое поле ввода.
- theme_token in includes/form.inc
- Темизирует токен формы.
- theme_trigger_display in modules/trigger/trigger.admin.inc
- Display actions assigned to this hook-op combination in a table.
- theme_update_page in includes/theme.maintenance.inc
- Generate a themed update page.
- theme_update_report in modules/update/update.report.inc
- Темизирует сообщение о состоянии модуля или темы.
- theme_update_version in modules/update/update.report.inc
- Темизирует отображение версии проекта.
- theme_upload_attachments in modules/upload/upload.module
- Отображение прикрепленных файлов в виде таблицы.
- theme_upload_form_current in modules/upload/upload.module
- Темизирует список прикрепленных файлов (вложений).
- theme_user_admin_account in modules/user/user.admin.inc
- Theme user administration overview.
- theme_user_admin_new_role in modules/user/user.admin.inc
- Theme the new-role form.
- theme_user_admin_perm in modules/user/user.admin.inc
- Темизирует страницу управления разрешениями.
- theme_user_list in modules/user/user.module
- Темизирует список пользователей.
- theme_xml_icon in includes/theme.inc
- Возвращает код, который отображает иконку XML.
- tracker_page in modules/tracker/tracker.pages.inc
- Menu callback. Prints a listing of active nodes on the site.
- translation_node_overview in modules/translation/translation.pages.inc
- Overview page for a node's translations.
- update_results_page in ./update.php
- update_status in modules/update/update.report.inc
- Menu callback. Generate a page about the update status of projects.
- update_task_list in ./update.php
- Add the update task list to the current page.
- upload_js in modules/upload/upload.module
- Коллбэк меню для JavaScript загрузок файлов.
- upload_nodeapi in modules/upload/upload.module
- Implementation of hook_nodeapi().
- user_admin_access in modules/user/user.admin.inc
- Menu callback: list all access rules
- user_admin_account in modules/user/user.admin.inc
- Form builder; User administration page.
See alsouser_admin_account_validate()
- user_block in modules/user/user.module
- Реализация hook_block().
- user_edit_form in modules/user/user.module
- user_login_block in modules/user/user.module
- user_user in modules/user/user.module
- Реализация hook_user().
- user_view in modules/user/user.pages.inc
- Menu callback; Displays a user or user profile page.
- _aggregator_page_list in modules/aggregator/aggregator.pages.inc
- Prints an aggregator page listing a number of feed items.
- _batch_progress_page_nojs in includes/batch.inc
- Batch processing page without JavaScript support.
- _db_error_page in includes/database.inc
- Вспомогательная функция для показа фатальных ошибок в базе данных.
- _locale_translate_seek in includes/locale.inc
- Perform a string search and display results in a table
- _node_mass_update_batch_finished in modules/node/node.admin.inc
- Node Mass Update Batch 'finished' callback.
- _system_sql in modules/system/system.admin.inc
- Theme a SQL result table.
Код
<?php
function theme() {
$args = func_get_args();
$hook = array_shift($args);
static $hooks = NULL;
if (!isset($hooks)) {
init_theme();
$hooks = theme_get_registry();
}
if (is_array($hook)) {
foreach ($hook as $candidate) {
if (isset($hooks[$candidate])) {
break;
}
}
$hook = $candidate;
}
if (!isset($hooks[$hook])) {
return;
}
$info = $hooks[$hook];
global $theme_path;
$temp = $theme_path;
$theme_path = $hooks[$hook]['theme path'];
if (!empty($info['file'])) {
$include_file = $info['file'];
if (isset($info['path'])) {
$include_file = $info['path'] .'/'. $include_file;
}
include_once($include_file);
}
if (isset($info['function'])) {
$output = call_user_func_array($info['function'], $args);
}
else {
$variables = array(
'template_files' => array()
);
if (!empty($info['arguments'])) {
$count = 0;
foreach ($info['arguments'] as $name => $default) {
$variables[$name] = isset($args[$count]) ? $args[$count] : $default;
$count++;
}
}
$render_function = 'theme_render_template';
$extension = '.tpl.php';
global $theme_engine;
if (isset($theme_engine)) {
if ($hooks[$hook]['type'] != 'module') {
if (function_exists($theme_engine .'_render_template')) {
$render_function = $theme_engine .'_render_template';
}
$extension_function = $theme_engine .'_extension';
if (function_exists($extension_function)) {
$extension = $extension_function();
}
}
}
if (isset($info['preprocess functions']) && is_array($info['preprocess functions'])) {
$args = array(&$variables, $hook);
foreach ($info['preprocess functions'] as $preprocess_function) {
if (function_exists($preprocess_function)) {
call_user_func_array($preprocess_function, $args);
}
}
}
$suggestions = array();
if (isset($variables['template_files'])) {
$suggestions = $variables['template_files'];
}
if (isset($variables['template_file'])) {
$suggestions[] = $variables['template_file'];
}
if ($suggestions) {
$template_file = drupal_discover_template($info['theme paths'], $suggestions, $extension);
}
if (empty($template_file)) {
$template_file = $hooks[$hook]['template'] . $extension;
if (isset($hooks[$hook]['path'])) {
$template_file = $hooks[$hook]['path'] .'/'. $template_file;
}
}
$output = $render_function($template_file, $variables);
}
$theme_path = $temp;
if ($hook == 'page' || $hook == 'book_export_html') {
$output = drupal_final_markup($output);
}
return $output;
}
?>
Войдите или
зарегистрируйтесь, чтобы получить возможность отправлять комментарии