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  
        )  
  
)  

本书共88小节:

评论 (写第一个评论)