22. 钩子、模块处理器、函数定义

钩子:

龹龶龵龳龱龭龫龧龣龢龞龛龙龖龕龓龒龑龏龍龋龈龇龃龈龂龀龇齾齺龧龣龢齶齴齱齰齯齬齩齥龍齡齟龵齛 php 齓龍齶齐齏龵齎齍龇齾齓龀齉齈龙龖龍齄齀鼼鼻鼺鼹鼸齄齀齈鼵鼲鼱鼯鼹鼬鼩鼵鼲鼱鼯鼧鼥龀鼤鼠鼞鼜鼙鼱齄齀鼹鼘齀鼱鼹鼔鼑龒鼧鼍龀鼊鼆鼤龵齛齎齍鼃鼂龀鼀黽黹黷鼱黵黳黱黮黭黫黧鼂龍龞龛黣鼱黵黟齴龧黛黚鼸黖黕黒黐黎黊龍黆黄齡龣鼵鼲黣黖鼯黟黣黐鼯黟黀龍麽黛麺麷黵麴鼵鼲鼱鼯龍龧黛麳鼱鼯齩齥鼸黳麰齎齍齏麬麪麧龍麦麢黖黕鼤龵鼱鼯麟鼔鼑龀麜麚龍黧鼂麦麢黽黖黕齶鼤龵鼱黵齶龍麦麢鼤龵鼱鼯齏麬龍麦麢麙鼤龵鼱鼯麙龍鼘齀鼱鼤龵麘麔麦麢麙黫鼱麑

黛麍龵龢鼱鼯麌麉龀齩齥龍麆麄龞龛龙龖麁黫鹿黳鹿 drupal 齓鼱鼯龀鹯龖鹮

drupal 鹫鹨齓鼱鼯龵黳麰鹤鹡齉齈龀鹟鹞麪麧龍鹫鹨麘麔齶齛鹫鹨鹚鹘鹗鹔黒鹘鹗鹚鹘鹗鹔鹟鹞龍麘麔鹐鹏鹋麙龀麦麢黫齏麬龍鹇鹆鹃鼤龵黧鼂鸿齾齓齛鼀黳龛鸽黷黧鼂鸺鸶鼀鹐鸴鹋麙龀麦麢龍龧龣龵黳龛麦麢齴龧龣龵黳鸱麦麢龍齐鸰鸬鸫龧黛鸴鸩龞鸱麦麢龍齛龞鸥黣鹐鸴鹋麙黟龞龛鸣鼤鸢齉齈麄鸡 drupal 龵鼘齀鹐鸴龞龛鹋麙龀鼺鼹齛齏麬齓鼸鼀麰鸠龣黧鼂黎龛麙鸞鸚鸿齾齓鼀龛鸽鼠黧鼂龞龛鸠龣鸖鼤龵鼱鼯麙龍鸓鹘鹗龧黛鸑鸴鸩黳龛麦麢龍麦麢麙鼸黣鹘鹗麙 _ 鼱鼯麙黟龍龞鸱麦麢麆鸌鸉鹐鸆鹮鼸鸃鸁鸉黳鸆鷿龀鷼麜龒鸴鸩鸚齴鼤龵鷹鷷鹃龀鼀鸠龣黧鼂鸖龍齛鸿齾齓龀鼀鸽黳黵鷶鷵黧鼂齶鷴龍鹘鹗鷰齈鷬鷩鼤鸴鸩鷥鷢麦麢龍鷞鷝鷜齡鸴鸩龍齛 php 齓麦麢龵鷘鷕鷑龀龍齛鷏鷋鷉鷅鷃龧黛黖黕麑鼱鼯龵齡龵鹚齎齍鷀鶼齓龀鷼齍鶹鶶鷀鶼鹘鶵鶴鶰鼺鼹鶯鶭龍鶫鷿麍齶鷴龵黳鼊鷼龍鼱鼯齏麬齓齛黧鼂鸽黖黕鼱鼯麦麢鶨龞龛鹞龃鼤鷥鶥鶤鶢龱麄黳龛鷼齍龍齏麬麄鸺鸶鼱鼯齏麬鹋麙龀麦麢鼤鷥鶥鶤鶹鶶麄龞龛鷼齍鸡

drupal8 齓鹫鹨鶝鶜鸴鸩麄龋龈鼱鼯麙龍齶鷴齛鹫鹨鼃鼂龀鸓龛鸽鶘黧鼂龍龞鶖鶔龋鹘鹗鷬鷩鼙鶒鶎齓黫龍鶌鷷麳鶋鶊鶇鶆鶅鶂黽龀麽麆鼱鼯麙麑鹘鹗鵿齈齏麬麄鸺鸶鼱鼯鹋麙龀麦麢龍龞鸱麦麢麳齛鼱鼯黖黕黽黧鼂龍麘鹡麳龞鸱麦麢鼵鼲鼱鼯齏麬麑鹘鹗齴龧黛鸑鸴鸩鼱鼯麙麑

元旦刚刚过去,继续保持一周一篇的速度,这是Drupal8云客源码分析系列在2017年的开篇,来讲几个极其重要的内容,它们是钩子、模块处理器、函数定义。

模块怎么定义一个钩子名呢?

鵻龹鹘鹗麙鼵黣 yunke 黟龍齈鸴鸩黳龛鼱鼯鸚麙鸖鼵鼲黣 sendMail 黟鵦齀齛鹘鹗龀鵣鵢鵟齓鵝鵜黳龛麙鼸黣 yunke.api.php 龀鷷齍龍鸥鵚鸴鸩黳龛鶖鵗麦麢鼵鼲鹮 hook_sendMail(...) 龍鵊麍鵈鵄龍鹃鵁齛 yunke 龞龛鹘鹗齓鼘齀鼃黕龞龛鼱鼯龀龍鼩麁齛 yunke 龞龛鹘鹗龀黮黭齓麘麔鹘鹗鵀齩鴿鸚鶌鷷鴾鸖黫黧鼂龞龛鼱鼯龍齐鸰鹘鹗齏麬麄龞龛鼱鼯鼤鼠鶘 yunke 龞龛鹘鹗黧鼂鼙龍齐齏黣 yunke.api.php 黟龞龛鷷齍龵齡鼠鶘鹫鹨黧鼂龀龍齶龀龃黕鸃鷕麺鸉黳龛鷷鴼龍鴺鴹齐鸰鹘鹗龳龱鴶黷齏麬鼱鼯龍齛鹫鹨齓鴴龧黛鹿鼙龋龈龞鶖龀鷷齍龍鸰鷴鴲鶤鹘鹗龀鵣鵢鵟龍齛 drupal 鴮鷅龀 API 鷷鴼鴧鸽鼤龵麘麔鸑鹞齥鴥齶鷴黫黐黎鼱鼯鵈鵄鷷鴼龀龍麽黛鶖鵗麦麢鹚鵈鵄鴢鴟鴛鴢龑龍齶龀龃黕鼤龵黳龛鷷鴼麑

鹘鹗鼘齀齏麬麍鵚鸴鸩龀 sendMail 鼱鼯鼺鼹鸴鸩黳龛麦麢龍麳麦麢麙黣 hook_sendMail 黟齓龀 hook 鴘鼸鸑鴔龀鹘鹗麙鴐龧龍麦麢鴌鴈齛 .module 鷷齍齓龍鵻龹齏麬龞龛鼱鼯龀鹘鹗鼵鼲黣 yunke_php 黟龍鵦齀鼤鴌鴈齛鵣鵢鵟龀 yunke_php. module 鷷齍齓麑

鴁鶤鼱鼯齏麬麦麢龀鷷齍鴲鴈鳿麆鳻鳷黳麰鴌鴈鷅鳴鹮鸴鸩龞龛鼱鼯龀鹘鹗龧黛鸴鸩黳龛鼱鼯鳲鳱麦麢龍鴌鴈齛 .module 鷷齍齓鸚鵻龹麍鷷鼤龵 yunke .module 鸖龍麦麢麙鳭鶵鼸鹮 " 鹘鹗麙 _hook_info" 龍龹麍鷷鼤龵黣 yunke _hook_info 黟龍齶麘麔鳦鼊鳥黫鳣鵁鼱鼯齏麬龧黛鴌鴈龀鴲鴈龍鳦鼊黳龛麢鳟龍鳛麙鼸鼱鼯麙龍龢鷢鳥鼸黳龛麢鳟鹮 Array ("group"=> $var) 龍黛鷹鷷龀 yunke 鹘鹗鼸鳈鹮鼱鼯鳲鳱麦麢麙鼸鹮黣 yunke_hook_info 黟龍龹龶鸰鳦鼊鳄鳂龹鶌鹮

$hooks[' sendMail '] = array('group' => 'user');

鵦齀齐鸰鹘鹗龢 sendMail 龞龛鼱鼯龀齏麬鳿龧黛鴌鴈齛鸑鴔鵣鵢鵟龀黣鹘鹗麙 .user.inc 黟鷷齍鸥龍龞鶖龀鷀鶼龵鼸麄麳鸢鲰鲭黕黒鸢鲪鲦龀鼱鼯鲢鵜鴌鴈齛 $module.$group.inc 鷷齍齓龍齡鷰齈黽龧齡鵊鲟龍鲜鲙鸆龣龍鹘鹗龀黣 .module 黟鷷齍鶇鶆龵鲘龛鲔鲐鷃鷕鸬鵊鲟龀麑鴁鶤鼱鼯鳲鳱麦麢 " 鹘鹗麙 _hook_info" 龀鹇鹆齏麬龧黛鷬鲎鹮 \core\modules\system\system.module 齓龀 system_hook_info()

鹘鹗鲜鲇龀鼱鼯鳲鳱麦麢鼠鶘鹘鹗鵀齩鴿黧鼂龍鲃龶鲁鱿麁鱾鴌齛鱺鱾齓黛鱶麁黕麑

鵁鱳麄鼱鼯龀鹯龖龍鼤齡鱱齩齥鹫鹨龀鹘鹗鵀齩鴿麄龍鱰鱭麑

模块处理器:

鹘鹗鵀齩鴿龵鳂鴿齓龀黳龛鱬鱪龍鱬鱪麙鼸黣module_handler黟龍齛鷏鷋鷉鷅鱨龧黛麘麔\Drupal::moduleHandler()鱙鼙龍齶鱗鱓鱏鱾鹫鹨龳鱋龀鹘鹗鳲鳱黒鵊鲟鹘鹗龀麦麢黒黧鼂鼱鼯黊龍齛鹫鹨齓鹤鹡龈龀鷉鷅鷃黕鼙麄齶龍龧黛鹃齶龵鹫鹨鹚鹘鹗黒鹘鹗鹚鹘鹗鷝鹔龀齉齈鱇鱃鷝黳麑
鷷齍鴲鶤鹮\core\lib\Drupal\Core\Extension\ModuleHandler.php
齶麆鰲龛鰮鰬鷬麢鹮
$root鸚app.root鸖鹮
龵黳龛SplString龢麷龍鰧龢麷黮鰦黳龛鸞鰥鰢鳥龍龵鹫鹨龀鰞鵢鵟龍鰝鳥齴鱏鱾齛鹡鰙DRUPAL_ROOT齓
$module_list鸚container.modules鸖鹮
鹫鹨龳鱋龀鹘鹗鶋鰦龍龵鳂鴿鷬麢龍齛鳂鴿鰮鵝黽鰈龓
$cache_backend鸚cache.bootstrap鸖
龵黳龛鱺鱾龍鶇鶆齏麬齓鰆麢鰃鰀bootstrap鱺鱾鰦黐黎麢鰃

齛drupal齓鹘鹗鶴鯾麆鯺麰鹮module鸚鯹麘鹘鹗鸖黒profile鸚鯷鴈鹘鹗鸖

齛鹫鹨鯴鯰鯮黱鸚鳂鴿麺鸁麁龀鶒鶎鯭鯪齓鹔鯩鸥鸖麳黖黕鹘鹗鵀齩鴿鵊鲟麽麆龳鱋鹘鹗龀黣.module黟鷷齍龍龞龛鷷齍鷥鶥鶤鹘鹗黕鼙龀麦麢鰀麑

鹘鹗鵀齩鴿龀齏麬鵻鯦鼔鼑龍龞鸥鵿鶋鶊黳鸱鹡黕鯥齈鸽黫鯣鯠鹮

加载模块的其他文件:

\Drupal::moduleHandler()->loadInclude($module, $type, $name = NULL)
鵊鲟鹘鹗$module鵣鵢鵟鶌鷷齍麙鼸$name鯓鯑麙鼸$type龀鷷齍龍鹘鹗鯏鯍龵龳鱋龀龍鷷齍麙鼸鯌鷜黕鹘鹗麙黮鯊龍龞鹡黕鶤鵊鲟麦麢鰀龍鶥鼩齴龧黛龵齐鸰鷷齍

系统默认有两个模块定义的钩子信息函数:

system_hook_info 鴲鶤鹮\core\modules\system\ system.module
views_hook_info 鴲鶤\core\modules\views\ views.module
鸰鷴龀鳦鼊鲃龶鶘鲁鱿麁鱾鴌鶤鱺鱾鰦bootstrap龀hook_info鱺鱾鯆齓

鸚黮黭麴鯄鯀鳄鳂鮾鸖

鹘鹗鲜鲇龀鼱鼯齛鹘鹗龀*.api.php file齓鯣鯠龍鵦龵鮼鮹鷬鲎鷷鴼
鮸鮷鼱鼯龀黧鼂鮴鮲鹮
龧黛齏麬module_implements_alter鼱鼯龍黕齶黫鮸鮷鼱鼯龀黧鼂鮴鮲

黧鼂鼱鼯鹮
\Drupal::moduleHandler()->invoke($module, $hook, array $args = array()) 黧鼂鼀鹘鹗齏麬龀鼱鼯
\Drupal::moduleHandler()->invokeAll($hook, array $args = array()) 黧鼂鹫鹨麽麆龀$hook鼱鼯
\Drupal::moduleHandler()->alter($type, &$data, &$context1 = NULL, &$context2 = NULL) 黧鼂鮸鮷鼱龍齶龵鵝鵜齛鼱鼯鷝麍龀鸠龣龍鮪鮨鷬麢黽龧黛鮤鮠鼱鼯龀_alter麁鮟

鳂鮞鮝鮛龀麙鸞鮙鮘鹮
鹘鹗麆鳄鸬鲭黕龀麪鴿麙鹚黕鶤鮕鮓鶴鮏鮎龀鮓鶴龧鮍麙龍麪鴿麙鱿齡龵鷷齍鮊麙龍龒龵info.yml鷷齍龀鷷齍麙鸚齡鮈.info.yml麁鮟鸖龍麽黛鷷齍鹋麙齈鰥鲁php鮄鰙鹋麙鮂鷜龍鷷齍鮊麙龧黛鹚鷷齍麙齡黳鮁龍鮓鶴龧鮍麙鳣鵁齛info.yml鷷齍鸥龀name鸞黱龍龧鲭黕鶌鶋黮黭鱙鼙鹮
\Drupal::moduleHandler()->getName($module)

<span style="font-size:14px;">function system_hook_info() {  
  $hooks['token_info'] = array(  
    'group' => 'tokens',  
  );  
  $hooks['token_info_alter'] = array(  
    'group' => 'tokens',  
  );  
  $hooks['tokens'] = array(  
    'group' => 'tokens',  
  );  
  $hooks['tokens_alter'] = array(  
    'group' => 'tokens',  
  );  
  
  return $hooks;  
}  
</span>

函数放置:

齈魽鼂drupal龳龱龍龳龱鴶魺齈鴁鶎龀龧龣鼤龵麦麢鰀龀鴌鴈龍鸰鷴鷢鰧鴌齛魹龛鷷齍鸥鵚鼺鼹
麘鹡魷鷴龵黛鹘鹗龀鷅鶵魴drupal鹫鹨魲鵊鷷齍龍麽黛魺魮龧黛麳麦麢鴌鴈齛鹘鹗鵣鵢鵟鶌龀黣鹘鹗麙.module黟鷷齍齓龍鰧鷷齍鼠鶘鹫鹨齛鳂鴿鵝鵜麁鶘鸑鹞鵊鲟
鼱鼯麦麢齡黆龧黛鴌鴈齛黣鹘鹗麙.module黟鷷齍齓鳿龧黛鴌鴈齛$module.$group.inc鷷齍齓龍鴟麴麍鷷
齴龧黛鴌鴈齛鹘鹗鵣鵢鵟鶌龀鷏鼼鷷齍齓龍黆齡鼠鶘鹫鹨鸑鹞鵊鲟龍鷰齈鲭黕黛鶌黮黭鸃鸁鵊鲟鹮
\Drupal::moduleHandler()->loadInclude($module, $type, $name = NULL);
齶鰦鮎鵊鲟鹘鹗$module鵣鵢鵟鶌鷷齍麙鼸$name鯓鯑麙鼸$type龀鷷齍龍鷷齍麙鼸鯌鷜黕鹘鹗麙黮鯊龍龞鹡黕鶤鵊鲟麦麢鰀龍鶥鼩齴龧黛龵齐鸰鷷齍
鵈鼼鴌鴈齛鹘鹗齓龀麦麢龍麘麔黛麍鷅鳴鵊鲟鱨麆黳龛鷹鲜鹮鹘鹗龵鱋黕龀鸡龞鹤鹡齉齈

龹龶麦麢魫鴁鷏鷋鹘鹗龍齴齡鷰齈龵魧鱋黕鹘鹗鱨齈鲐鷕鴧魥黕鼘齀鵀齩鼺鼹
龧黛齛鴧鸽鯷鴈鷷齍鸚鶇鶆龵\sites\default\ settings.php鸖齓include魽黫龍魢魡齓龧黛鲭黕鹡鰙DRUPAL_ROOT龍齶鰦鮎drupal鶅鶂鰞鵢鵟龀魟龢魢魡龍魜鵁齛/core/includes/bootstrap.inc齓龍鵻龹鹮
include_once DRUPAL_ROOT."/yunkelib.php"; //鵈鼼齡齈魗魔鷞魓魒
龞鶖鼤龧黛鷏鼼鵊鲟鸑鴔龀麦麢鰀麄龍齡魐鷏鷋魍麧麑
龞鸥鷰齈鵈鼼鹮齛鷏鷋黽魌鷃齡齈黷鮸鮷core鸥鵚龀鳄鳂龍魧鷜魋魈黽麳龧龣麆魅魄

魃鬿麦麢鵊鲟龀黽鹔鮴鮲龍麆黳龛鬼魮魈龍鬼魮魈鴢鲙鴢魮鵊鲟龍龹鶌鹮
鯷鴈鷷齍鵊鲟>黣鹘鹗麙.module黟> loadInclude麦麢

php基础知识提示:php文件可以使用任意扩展名,包含进来时将只关注它的内容,不会在意它的扩展名,这也是系统中许多函数可以放置在非php后缀的原因
详见php官网http://php.net/manual/zh/function.include.php

附件:列出默认安装中钩子的实现

齛鱺鱾齓鱏鱾麄鼱鼯龀鶇鶆齏麬鹚鼱鼯鳲鳱鹮
module_implements.bin 鹮鼱鼯龀齏麬鳲鳱 鳛麙鼸鼱鼯麙龍鳛鳥鼸黳龛麢鳟龍鰧麢鳟鳛麙鼸齏麬麄龞龛鼱鼯龀鹘鹗麙龍龢鷢鳥鼸鴲鴈$group鳲鳱龍龹龶鶯麆$group鷜鼸false

Array  
(  
    [module_implements_alter] => Array  
        (  
        )  
  
    [entity_load] => Array  
        (  
        )  
  
    [view_load] => Array  
        (  
        )  
  
    [language_types_info] => Array  
        (  
        )  
  
    [language_types_info_alter] => Array  
        (  
            [language] =>   
        )  
  
    [views_pre_view] => Array  
        (  
        )  
  
    [views_plugins_sort_alter] => Array  
        (  
        )  
  
    [views_plugins_filter_alter] => Array  
        (  
        )  
  
    [views_plugins_area_alter] => Array  
        (  
        )  
  
    [views_pre_build] => Array  
        (  
        )  
  
    [views_plugins_query_alter] => Array  
        (  
        )  
  
    [views_query_alter] => Array  
        (  
        )  
  
    [views_query_substitutions] => Array  
        (  
            [node] => views_execution  
            [user] => views_execution  
            [views] => views_execution  
        )  
  
    [views_post_build] => Array  
        (  
        )  
  
    [views_pre_execute] => Array  
        (  
        )  
  
    [views_plugins_cache_alter] => Array  
        (  
        )  
  
    [query_alter] => Array  
        (  
        )  
  
    [query_views_alter] => Array  
        (  
            [views] =>   
        )  
  
    [query_views_frontpage_alter] => Array  
        (  
        )  
  
    [node_grants] => Array  
        (  
        )  
  
    [query_node_access_alter] => Array  
        (  
            [node] =>   
        )  
  
    [query_node_load_multiple_alter] => Array  
        (  
        )  
  
    [entity_storage_load] => Array  
        (  
            [comment] =>   
        )  
  
    [node_storage_load] => Array  
        (  
        )  
  
    [node_load] => Array  
        (  
        )  
  
    [views_post_execute] => Array  
        (  
        )  
  
    [entity_view_mode_alter] => Array  
        (  
        )  
  
    [node_build_defaults_alter] => Array  
        (  
        )  
  
    [entity_build_defaults_alter] => Array  
        (  
        )  
  
    [views_pre_render] => Array  
        (  
            [views] => views_execution  
        )  
  
    [views_post_render] => Array  
        (  
        )  
  
    [theme_suggestions_views_view] => Array  
        (  
        )  
  
    [theme_suggestions_alter] => Array  
        (  
        )  
  
    [theme_suggestions_views_view_alter] => Array  
        (  
        )  
  
    [template_preprocess_default_variables_alter] => Array  
        (  
            [user] =>   
        )  
  
    [theme_suggestions_views_view_unformatted] => Array  
        (  
        )  
  
    [theme_suggestions_views_view_unformatted_alter] => Array  
        (  
        )  
  
    [entity_extra_field_info] => Array  
        (  
            [comment] =>   
            [contact] =>   
            [node] =>   
            [user] =>   
        )  
  
    [comment_type_load] => Array  
        (  
        )  
  
    [node_type_load] => Array  
        (  
        )  
  
    [entity_extra_field_info_alter] => Array  
        (  
        )  
  
    [field_formatter_info_alter] => Array  
        (  
            [editor] =>   
            [quickedit] =>   
        )  
  
    [entity_view_display_load] => Array  
        (  
        )  
  
    [entity_view_display_alter] => Array  
        (  
            [node] =>   
        )  
  
    [entity_prepare_view] => Array  
        (  
            [rdf] =>   
        )  
  
    [rdf_mapping_load] => Array  
        (  
        )  
  
    [entity_field_access] => Array  
        (  
            [language] =>   
        )  
  
    [entity_field_access_alter] => Array  
        (  
        )  
  
    [query_user_load_multiple_alter] => Array  
        (  
        )  
  
    [user_storage_load] => Array  
        (  
        )  
  
    [user_load] => Array  
        (  
        )  
  
    [date_format_load] => Array  
        (  
        )  
  
    [entity_display_build_alter] => Array  
        (  
        )  
  
    [node_view] => Array  
        (  
        )  
  
    [entity_view] => Array  
        (  
            [comment] =>   
        )  
  
    [node_view_alter] => Array  
        (  
            [comment] =>   
            [history] =>   
        )  
  
    [entity_view_alter] => Array  
        (  
            [quickedit] =>   
        )  
  
    [theme_suggestions_node] => Array  
        (  
            [node] =>   
        )  
  
    [theme_suggestions_node_alter] => Array  
        (  
            [views] =>   
        )  
  
    [theme_suggestions_field] => Array  
        (  
            [system] =>   
        )  
  
    [theme_suggestions_field_alter] => Array  
        (  
        )  
  
    [theme_suggestions_username] => Array  
        (  
        )  
  
    [theme_suggestions_username_alter] => Array  
        (  
        )  
  
    [user_format_name_alter] => Array  
        (  
        )  
  
    [file_url_alter] => Array  
        (  
        )  
  
    [user_build_defaults_alter] => Array  
        (  
        )  
  
    [theme_suggestions_rdf_metadata] => Array  
        (  
        )  
  
    [theme_suggestions_rdf_metadata_alter] => Array  
        (  
        )  
  
    [user_view] => Array  
        (  
            [user] =>   
        )  
  
    [user_view_alter] => Array  
        (  
            [user] =>   
        )  
  
    [theme_suggestions_user] => Array  
        (  
        )  
  
    [theme_suggestions_user_alter] => Array  
        (  
        )  
  
    [filter_format_load] => Array  
        (  
        )  
  
    [filter_info_alter] => Array  
        (  
        )  
  
    [node_links_alter] => Array  
        (  
            [comment] =>   
        )  
  
    [query_comment_access_alter] => Array  
        (  
        )  
  
    [query_entity_query_alter] => Array  
        (  
        )  
  
    [query_entity_query_comment_alter] => Array  
        (  
        )  
  
    [theme_suggestions_links] => Array  
        (  
        )  
  
    [theme_suggestions_links_alter] => Array  
        (  
        )  
  
    [link_alter] => Array  
        (  
        )  
  
    [theme_suggestions_pager] => Array  
        (  
        )  
  
    [theme_suggestions_pager_alter] => Array  
        (  
        )  
  
    [theme_suggestions_feed_icon] => Array  
        (  
        )  
  
    [theme_suggestions_feed_icon_alter] => Array  
        (  
        )  
  
    [theme_suggestions_container] => Array  
        (  
        )  
  
    [theme_suggestions_container_alter] => Array  
        (  
            [views] =>   
        )  
  
    [block_load] => Array  
        (  
        )  
  
    [entity_access] => Array  
        (  
        )  
  
    [block_access] => Array  
        (  
        )  
  
    [block_build_alter] => Array  
        (  
        )  
  
    [block_build_system_branding_block_alter] => Array  
        (  
        )  
  
    [block_build_system_menu_block_alter] => Array  
        (  
        )  
  
    [block_build_system_messages_block_alter] => Array  
        (  
        )  
  
    [block_build_system_breadcrumb_block_alter] => Array  
        (  
        )  
  
    [block_build_page_title_block_alter] => Array  
        (  
        )  
  
    [block_view_alter] => Array  
        (  
        )  
  
    [block_view_page_title_block_alter] => Array  
        (  
        )  
  
    [block_build_local_tasks_block_alter] => Array  
        (  
        )  
  
    [block_build_help_block_alter] => Array  
        (  
        )  
  
    [block_build_local_actions_block_alter] => Array  
        (  
        )  
  
    [block_build_system_main_block_alter] => Array  
        (  
        )  
  
    [block_view_system_main_block_alter] => Array  
        (  
            [system] =>   
        )  
  
    [block_build_search_form_block_alter] => Array  
        (  
        )  
  
    [block_build_system_powered_by_block_alter] => Array  
        (  
        )  
  
    [page_attachments] => Array  
        (  
            [contextual] =>   
            [quickedit] =>   
            [system] =>   
        )  
  
    [page_attachments_alter] => Array  
        (  
            [taxonomy] =>   
        )  
  
    [page_top] => Array  
        (  
            [block] =>   
            [node] =>   
            [toolbar] =>   
            [update] =>   
        )  
  
    [page_bottom] => Array  
        (  
            [tour] =>   
        )  
  
    [theme_suggestions_html] => Array  
        (  
            [system] =>   
        )  
  
    [theme_suggestions_html_alter] => Array  
        (  
        )  
  
    [rdf_namespaces] => Array  
        (  
            [rdf] =>   
        )  
  
    [theme_suggestions_page] => Array  
        (  
            [system] =>   
        )  
  
    [theme_suggestions_page_alter] => Array  
        (  
        )  
  
    [theme_suggestions_region] => Array  
        (  
            [system] =>   
        )  
  
    [theme_suggestions_region_alter] => Array  
        (  
        )  
  
    [theme_suggestions_block] => Array  
        (  
            [block] =>   
        )  
  
    [theme_suggestions_block_alter] => Array  
        (  
        )  
  
    [theme_suggestions_page_title] => Array  
        (  
        )  
  
    [theme_suggestions_page_title_alter] => Array  
        (  
        )  
  
    [shortcut_default_set] => Array  
        (  
        )  
  
    [shortcut_set_load] => Array  
        (  
        )  
  
    [query_shortcut_access_alter] => Array  
        (  
        )  
  
    [query_entity_query_shortcut_alter] => Array  
        (  
        )  
  
    [shortcut_load] => Array  
        (  
        )  
  
    [block_view_local_tasks_block_alter] => Array  
        (  
        )  
  
    [menu_local_tasks_alter] => Array  
        (  
            [contact] =>   
        )  
  
    [block_view_help_block_alter] => Array  
        (  
            [help] =>   
        )  
  
    [help] => Array  
        (  
            [automated_cron] =>   
            [ban] =>   
            [block] =>   
            [block_content] =>   
            [breakpoint] =>   
            [ckeditor] =>   
            [color] =>   
            [comment] =>   
            [config] =>   
            [contact] =>   
            [contextual] =>   
            [datetime] =>   
            [dblog] =>   
            [dynamic_page_cache] =>   
            [editor] =>   
            [field] =>   
            [field_ui] =>   
            [file] =>   
            [filter] =>   
            [help] =>   
            [history] =>   
            [image] =>   
            [language] =>   
            [link] =>   
            [locale] =>   
            [menu_ui] =>   
            [node] =>   
            [options] =>   
            [page_cache] =>   
            [path] =>   
            [quickedit] =>   
            [rdf] =>   
            [search] =>   
            [shortcut] =>   
            [system] =>   
            [taxonomy] =>   
            [text] =>   
            [toolbar] =>   
            [tour] =>   
            [update] =>   
            [user] =>   
            [views_ui] =>   
            [menu_link_content] =>   
            [views] =>   
        )  
  
    [block_view_local_actions_block_alter] => Array  
        (  
        )  
  
    [theme_suggestions_status_messages] => Array  
        (  
        )  
  
    [theme_suggestions_status_messages_alter] => Array  
        (  
        )  
  
    [library_info_alter] => Array  
        (  
            [ckeditor] =>   
            [color] =>   
            [locale] =>   
            [quickedit] =>   
        )  
  
    [css_alter] => Array  
        (  
        )  
  
    [js_alter] => Array  
        (  
            [locale] =>   
        )  
  
    [js_settings_build] => Array  
        (  
            [system] =>   
        )  
  
    [js_settings_alter] => Array  
        (  
            [locale] =>   
            [system] =>   
            [user] =>   
        )  
  
    [contextual_links_alter] => Array  
        (  
        )  
  
    [menu_load] => Array  
        (  
        )  
  
    [menu_access] => Array  
        (  
        )  
  
    [contextual_links_view_alter] => Array  
        (  
            [contextual] =>   
            [views_ui] =>   
        )  
  
    [view_access] => Array  
        (  
        )  
  
    [quickedit_editor_alter] => Array  
        (  
        )  
  
    [ajax_render_alter] => Array  
        (  
        )  
  
)  

hook_info.bin鹮鼱鼯鳲鳱麦麢鳦鼊龀鲁鱿鲃龶龍鳛麙鼸鼱鼯麙龍鳛鳥鼸黳龛麢鳟龍group黮鰦鰧鼱鼯齏麬鳿龧黛鱾鴌齛$module.$group.inc鷷齍齓

Array  
(  
    [token_info] => Array  
        (  
            [group] => tokens  
        )  
  
    [token_info_alter] => Array  
        (  
            [group] => tokens  
        )  
  
    [tokens] => Array  
        (  
            [group] => tokens  
        )  
  
    [tokens_alter] => Array  
        (  
            [group] => tokens  
        )  
  
    [views_data] => Array  
        (  
            [group] => views  
        )  
  
    [views_data_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_analyze] => Array  
        (  
            [group] => views  
        )  
  
    [views_invalidate_cache] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_access_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_area_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_argument_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_argument_default_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_argument_validator_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_cache_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_display_extender_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_display_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_exposed_form_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_field_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_filter_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_join_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_pager_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_query_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_relationship_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_row_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_sort_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_style_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_plugins_wizard_alter] => Array  
        (  
            [group] => views  
        )  
  
    [views_query_substitutions] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_form_substitutions] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_pre_view] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_pre_build] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_post_build] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_pre_execute] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_post_execute] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_pre_render] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_post_render] => Array  
        (  
            [group] => views_execution  
        )  
  
    [views_query_alter] => Array  
        (  
            [group] => views_execution  
        )  
  
    [field_views_data] => Array  
        (  
            [group] => views  
        )  
  
    [field_views_data_alter] => Array  
        (  
            [group] => views  
        )  
  
)  

本书共63小节:

评论 (写第一个评论)