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

本书共71小节:

评论 (写第一个评论)