config install schema 1

The top-level key ("system.maintenance") in the file refers to the base filename of the .yml file ("system.maintenance.yml") and to the name of the configuration object (config('system.maintenance')).

core/modules/system/config/schema/system.schema.yml

system.maintenance:
  type: config_object
  label: 'Maintenance mode' mapping: message: type: text label: 'Message to display when in maintenance mode'

文件的第一行 就是 (system.maintenance) top-level key

------
The type mapping is a basic type for key-value pairs.
the schema label:'Maintenance mode' describes the content of the schema.
Each element has a type and a label key which respectively describes the data type and gives a description of the data.
The label usually is the same or similar to the configuration form label where the value can be edited by the system administrator.
Mapping的键值(key)就是要代表的文件里的key

---
貌似这里的配置是固定的配合, 然后config form是灵活的配置吗?

 https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-schemametadata

 

config/
  schema
  install
  optional

很晕, 到底是干啥的, 为啥我就是理解不了哦
schema下面是关于结构的描述,install下面是各个具体的配置的键值对的值
对于这种yml数据结构就是: 左:右, 右是左的描述,不是相等的关系, 相当于描述性替代。

------
dynamic一般用的少, 一般用在type键值对右边来对type进行阐述, 这个值又将作为一个top key, 接受另一轮的key value的值的描述和扩展。


   
    

你可能感兴趣的:(config install schema 1)