6.5 创建info.yml文件

  • 1龶龴龲hello_world.info.yml龓龑
  • 2龶龎龋龇龅龂龁
    name: 'hello_world'
    package: 'Custom'
    description: 'An example module showing how to define a page to be displayed at a given URL.'
    type: module
    core: 8.x
    齑齍齋齈齇齆齄齃鼿鼽龶齃鼿齆齄龶鼺鼸鼶(鼯)鼫鼩鼧鼣鼡鼞鼚鼖Drupal 8鼐齃鼿鼏鼋鼈鼆鼃name鼂黿鼞鼚鼖齃鼿鼏鼋鼈鼆鼐鼽黾鼫description鼂黿鼞鼚鼖齃鼿鼏鼋鼈鼆鼐齆齄鼫package黽黻黷齃鼿黳齋黰鼯鼃黭黬Core鼶黪黨Drupal 8黦黢點黚鼐齃鼿鼃黖鼧黒黑黍齈package:Custom黋黉黈齃鼿鼸齇黅黿黃齃鼿鼶鼃type黀齈黪鼂黿麿麻鼐麸麷鼫麵麳麱麮module龶theme麪profile鼃

info.yml黑麨麧麥麣鼐麟麞鼸麜麛

name: hello_world
description: Creates a page showing "Hello World"
package: Custom
type: module
core: 8.x
dependencies:
- datetime: datetime
- link: link
- drupal: views
test_dependencies:
  - drupal: image

configure: hello_world.settings
hidden: true

# Note: do not add the ‘version’ property yourself!
# It will be added automatically by the packager on drupal.org

version:1.0
  • dependencies: 鹺鹸鹴鼐齃鼿鹰鹯鼐齃鼿鼃麥鹭鹩麮{project}:{module}鼫{project}黪鹸鹟鼖Drupal.org鹜鹛url鹘鼐鹜鹛鼽黾鼫黭黬drupal.org/project/views鼫{module}黪齃鼿鼐鹕鹔鼽鼃

  • test_dependencies: 鹐鹍鼐鹰鹯齃鼿鼃testbot鼡黷鹌鹊齃鼿鼐鹰鹯鹇鹅黳齋鹐鹍鼃黬鹂鹁鸾鹐鹍鹰鹯鹇鹅黪鸺鸷鼐龶鸴鹌鼐鼫鸲鸱鼣麥鸮鸪dependencies鹘鼃鼖鸨鼆鼐黭鸦鹘鼫鼖鹐鹍鸣鸠testbot鼡鼶鸞image齃鼿鼃鸛鸙鸘鸔鸓鸒Hello World Module鸒齃鼿鸌鸊鼡鸉鸆鸔鸓image齃鼿鼃鹐鹍鹰鹯鼐鸂鼽鷾鷼鷻鹰鹯鼐鸂鼽鷾鷼鷸鷴鼃 testbot鹐鹍鷲 https://www.drupal.org/docs/8/phpunit/running-phpunit-tests鼃

  • configure: 黬鹂鹴鼐齃鼿點黚鷮麟鹊鷬鷪黋鷧鼫鼖黒黑麵龇鼂黿鷬鷪鼐鷣黨鼃鷠齈鷞麻鷚齃鼿鷘鷔鸌鼫鼩鼣鼡鼖Extend鼈(/admin/modules)鼞鼚麟鹊鷐鷎鼃

  • hidden:true 鼖鸙鸘Extend鼈鼆(/admin/modules)鼐齃鼿鹺黋鹘鷋鷈鹴鼐齃鼿鼃黬鹂齃鼿鷅鷅鼶鸞麟鹊鹐鹍麪黀麮麟鹊鷚鷄黭鸦鼫鹴鷄鹟黍齈黒鹊鷃黪鷂鷁麧齈鼐鼃

鷀麵龇鼖settings.php龓龑鹘鶿龋

$settings['extension_discovery_scan_tests'] = TRUE

龇鼞鼚齃鼿鼃

本书共79小节:

评论 (写第一个评论)