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小节:

评论 (2)