51. 字段API(上)

龺龶API龰龮龺龶龬龨龤龠龝龜龤龚龖龒龑龍龋龊龇龆龄龁龀齽齺齸龋龇齴齰龁龀齭齩齨齤齣齟齽龆龄龋齝齜齘龇齕齒齐龠龝龜齍齋齭齊齽齉

齇龺龶齄齀鼿齽鼽鼹鼸

龺龶API齍齋鼷齽齇龺龶齄鼵鼴鼲鼰鼷鼮齽齇龺龶齄齀鼿龇齨鼫鼨齽龋鼧鼤龇鼴鼲鼰鼮鼷齽鼫鼠鼝龋齩鼤龇鼫鼠鼚齀鼗鼠鼕鼔齽鼴鼲鼐鼍龋鼊鼚齀鼉鼧鼤齽鼆鼃龋鼁黿黼鼗黸鼧鼤黴黲齽黰黯鼵黮黭龋齩鼤黪黩黥黡龁龀鼐鼍齽黰黯黟齐鼴鼲鼰鼮龺龶黛鼠黚默齊龋黼鼗cms黏黍鼫鼠鼴鼲黌龝齽鼗鼠黴黲黰黯鼫鼫鼐黈鼫鼠龺龶黆龬龨齐鼴鼲鼰齽黍鼫黂鼮麿龋齝drupal麭齨黍龋齜麪麨鼫鼠黰黯齕齒鼫黂鼮龋鼮鼷黿鼫鼠鼆龺龶麦龬龨麥黰黯齽鼆龋黆龰龮麤麣龺龶麦龬龨黸麥黰黯黴黲齽鼕鼔龋麡黂鼴鼲鼮麞齊黚黈麜麙鼍麘鼫鼠齇龺龶齄龋麗麕麓麘龺龶api鼷齽龺龶鼴鼲鼐鼍黟麋麉麣麆齽齀鼿龇齨鼫鼨齽龋齐麄麜黚默麁麀齨鹾黛鼫鹺龋drupal齽龁鹸鹵鹳鹯鹫龋鹪鹦鹢鹵鹠龋鹞麦鹛鼗鹛鹙齽龑龍龋鹖鹓鼸鹏鹋鹊黼鼗鼴鼲黌龝鹇龆龄龠龝鹅鹄麜鼫鼠齇龺龶齄龋黛齐鹀黚龁鸾齊龇鼫黂龺龶鼮龬龨鼉齨黍龆龄龠龝齽鼕鼔龋齐鼮鼷麜bundle龺龶鹳麉鼽鼹黟鸴鸱龁鹸鼉鼗鼆龺龶龑龍龋鸰鸮鸭鸪龋鸨鸥鸣鸢齉

龠龝龜api鸠鸟鼸

鹇鸝鸛龇鼐龠龝龜齍齋齽鸗鸓鸠鸟黸鸏鸋龋鹵鼗鸇鸆鸝鹏鼝齽龠龝龜鼴鼲鸃鷿鹅齐drupal鼷黼鼗鷼鷹鷸麜鼉齇鼴鼲鼐鼍+鷲鼴鼲鼐鼍齄齽鷯鷬黌鷨龋鹓龁龀龤鷤齋龤龺龶龤龠龝龜龒龋鼴鼲鼐鼍鷡龨鼵鷠鷟鼴鼲龋鷲鼴鼲鼐鼍鷡龨黴黲鼴鼲齽鼴鼲龋鷲鼴鼲鹇Metadata鹅鼐鼍黿鷘齘鷕鼴鼲鷔鼿鼐鼍龋龊麆鸏龇麘鼐鷑鹸龋龠龝龜鼴鼲齍齋鷍龇黛鷌鷈龝龁鹸齉

麡鼠龠龝龜齍齋龰龮鷆鷅龠鼹鼴鼲鼸

齺鸝鼴鼲鼸齘齤鷕麪鷄鷁鼴鼲龤齺鷀鼴鼲龋龇鶽齕鶺鶹鼴鼲鼵鼝鼮鼴鼲齽齺鸝鸓鷲

鼝鼮鼴鼲鼸齤麉鶷麪鷡龨黍龠鼴鼲龠龝齽鶳鶯鼴齍龋龊齽鷲鶭齤麉龇齺鸝鼴鼲龤鶺鶹鼴鼲龤鼝鼮鼴鼲

鶺鶹鼴鼲鼸齤麉鶷麪黲鶬鼴齍龋鶨麪鷡龨黰黯麪鶥齽齽鼐鼍龋鶢鶞黰黯鶚鷡龨鶗龠鼴鼲

鶔鼃鼁龰龮鶯麜龠龝鼴鼲龋鶯麜龠龝鶒龇鼫鼠鶯麜龋黆齨鶎鼮鶍鶉齽鼴鼲龋鶢鶞麉齊鷆鷅龠鼹齽鼴鼲鼵鶯麜龠龝鼴鼲鷍齤麉龠龝龜麋黿鼴鼲龋黆龰龮鹵鶇鼫鶅鼹齽麄麜鼉黟鶄麆鶁龁鶀龜鼫鼠龠龝龜鼴鼲鼐鼍龇鵿龠龝id鵼鷁齽龋鶢鶞龠龝id鵹鹾龠龝鷔鼿鼐鼍龋鵶鶢鶞龠龝鷔鼿鼐鼍鷍齤麉鵵鵲鼴鼲鼐鼍龠齐鵮麿麉鵭黴黲鷲鼴鼲龋鸱鼧鵪鼴鼲鼐鼍龰龮齽鵨鵤鷹鵣龁鶀龜鸴鵡龋黛鼠鶞鵞鵝鵚鵗齐龠龝龜鼴鼲鵕鵑鵐鼷龋鵪龊龰龮麄麜黩鵏龋黡鸱鶄麆鵋齤麉黪黩鷠鵇麉齊鶞鵞齉

麋黿龠龝龜鼴鼲鼐鼍鵄龰龮getValue龤setValue鷹鵣龋麣麆鷠鵇齽龇php齽鷄鷁鼴鼲龠龝黟鶺鶹龠龝鼵鼝鼮龠龝龰龮get龤set鷹鵣龋麣麆鷠鵇齽龇龠龝龜鼴鼲鼐鼍鹇鴻鴷鼸黛麿鶺鶹龠龝齽set鷹鵣鷯黭齽鼆黈麪php齽鷄鷁龠龝龋齨鸰鸮龠龝龜鼴鼲鼐鼍龋齝鼝鼮龠龝鴴齤麉龋黛龇鼫鼠齨鴱鴯齽鷼鷹鹅

麋黿龠龝龜鼴鼲鼐鼍鵄龁鹸麉鴭黩鵏鼸

Drupal\Core\TypedData\TypedDataInterface

鶗龠龝鼴鼲鼐鼍龁鹸齽黩鵏鼸

Drupal\Core\TypedData\PrimitiveInterface

Drupal\Core\TypedData\ListInterface

Drupal\Core\TypedData\ComplexDataInterface

鶗龠鷲鼴鼲鼐鼍鹇鼴鼲鷔鼿鼐鼍鹅龁鹸齽黩鵏鼸

Drupal\Core\TypedData\DataDefinitionInterface

Drupal\Core\TypedData\ListDataDefinitionInterface

Drupal\Core\TypedData\ComplexDataDefinitionInterface

鶯麜龠龝齽鼴鼲鼐鼍鼵鷔鼿鼐鼍龁鹸齽黩鵏鼸

Drupal\Core\TypedData\DataReferenceInterface

Drupal\Core\TypedData\DataReferenceDefinitionInterface

鸇鴎鹪鴋鴊黛鴉黩鵏龋麡鼠鴆鴄鷍鷑鹸鼉齉

龺龶鼐鼍鼵龺龶鷔鼿鼐鼍鼸

龺龶齍齋鴃鸱鷸麜鼉齇鼴鼲鼐鼍+鷲鼴鼲鼐鼍齄齽鷯鷬黌鷨龋鼐黈齽鷕麪龺龶鼐鼍鼵龺龶鷔鼿鼐鼍鼸

龺龶鼐鼍鼸

麨鼠龁龀龺龶鼐鼍鹇龁龀齽龺龶黰黯鹅鵄龇鼫鼠鼝鼮龠龝齽龠龝龜鼴鼲鼐鼍龋麪鴁鴀龇鼝鼮龠龝鳼鳺黛龇鳶麪麨鼠龺龶鼐鼍鵄齤麉鼚齀鼴鼲鼰鼷鼗鳵鼴鼲鳳鳯龋麨鳵鳳鳯鼐黈鼫鼠龺龶鳬FieldItem龋鼝鼮鼷齽鼫鼠鷲鶭鷍鼐黈鳧鼫鼠龺龶鳬龋鳶鶔鳣鳟龁鹸麥黩鵏鼸

Drupal\Core\Field\FieldItemListInterface鹇鳞鳝鸴鼝鼮鼴鼲黩鵏鼸Drupal\Core\TypedData\ListInterface鹅

麤鼷齽麨鼠鼝鼮鷲鶭龇鼫鼠龺龶鳬FieldItem鼐鼍龋龇鼫鼠鶺鶹龠龝鼴鼲鼐鼍鹇鼐黈鼴鼲鼰鼷齽鼫鳵鼴鼲鳳鳯鹅龋鼝鼮鷲鶭鳣鳟龁鹸麉鴭黩鵏鼸

\Drupal\Core\Field\FieldItemInterface鹇鳞鳝鸴鶺鶹鼴鼲黩鵏鼸Drupal\Core\TypedData\ComplexDataInterface鹅

龺龶鼐鼍齽鳛鳗龁鹸鼸

Drupal\Core\Field\FieldItemList

麤鼷鼝鼮鷲鶭鼐鼍齽鳛鳗龁鹸麪鼸

Drupal\Core\Field\FieldItemBase

龺龶鷔鼿鼐鼍鼸

龺龶鷔鼿鼐鼍龇麦鳔鳓龺龶鼐鼍齽鷲鼴鼲鼐鼍龋鳒齐鹏鹋鼷黏龺龶鷔鼿鸥麪鳐鼠鶅鼹龋齤麉鷕麪鼸鶢麜鶅鼹鼵龬龨鶅鼹龋龊麆鼫鳏龁鹸龺龶鷔鼿鼐鼍齽龑龍龋鶢麜龺龶鷔鼿鼐鼍龁鹸麥黩鵏鼸

Drupal\Core\Field\FieldDefinitionInterface

鹇鳞鳝鸴鼝鼮鼴鼲鷔鼿鼐鼍鼸Drupal\Core\TypedData\ListDataDefinitionInterface鹅

龺龶龬龨鷔鼿鼐鼍龁鹸麥黩鵏鼸

Drupal\Core\Field\FieldStorageDefinitionInterface

齐鶢麜龺龶鷔鼿鼐鼍鼷齤麉鶢鶞getFieldStorageDefinition()鷹鵣鵹鹾龺龶龬龨鷔鼿鼐鼍

龺龶鷔鼿鼐鼍齽鳛鳗龁鹸龇鼸

Drupal\Core\Field\BaseFieldDefinition

麤鼷齽鷲鶭鷔鼿鼐鼍鳛鳗龁鹸龇鼸

Drupal\Core\Field\TypedData\FieldItemDataDefinition

鹏鹋鳛鳗龰龮齽龺龶鳬FieldItem龠龝鼸

龺龶鼐鼍龇龺龶鳬FieldItem鼐鼍齍麘齽鼝鼮鼴鼲鼐鼍龋龺龶鳬FieldItem齽龠龝鶎鼮鳧龺龶龠龝龋鹏鹋鷔鼿鼉黼鼗龺龶龠龝龋麨鼠龠龝鵄鼐黈鳧鼫鼠龠龝龜鼴鼲龠龝龋龠龝id鳃鷨鹓鴭鼸

"field_item:FIELD_TYPE"

鳛鳗龠龝鹓鴭鹇鲶鸝鹏鼝齽龠龝龜api鸃鷿鹅龋麉龠龝id鼝鷑鼸

    [46] => field_item:comment
    [47] => field_item:datetime
    [48] => field_item:file
    [49] => field_item:image
    [50] => field_item:link
    [51] => field_item:list_float
    [52] => field_item:list_integer
    [53] => field_item:list_string
    [54] => field_item:path
    [55] => field_item:text
    [56] => field_item:text_long
    [57] => field_item:text_with_summary
    [58] => field_item:boolean
    [59] => field_item:changed
    [60] => field_item:created
    [61] => field_item:decimal
    [62] => field_item:email
    [63] => field_item:entity_reference
    [64] => field_item:float
    [65] => field_item:integer
    [66] => field_item:language
    [67] => field_item:map
    [68] => field_item:password
    [69] => field_item:string
    [70] => field_item:string_long
    [71] => field_item:timestamp
    [72] => field_item:uri
    [73] => field_item:uuid

鹇龺龶api齊鸛鲌鹅

鵇鼤鲉鼸

鲅鼠鲄鲁黿鹵鱽龋鱺黲鴻鸝鹏鼝齽鱸鼤鱷龒鼉龋黛龇鳶麪鱴鱰齐鱯鹫鼷鵝麋鱬齽鲅齋鱯鹫鷅鱫鱨鱥龋鱣鱡麨鱟鱞鱚齽鼮鱗鴃鸱鱔鸮齐鱐鱌鱈麨鱟鱞鱇drupal齽鹺鹺鱆鱆龋鱄鱃鴃鸱鱔鸮鰿鰾鸃鷿鰼鵞龋黛鷌鱔鸮齐鱔鸮鼤齭鱡龇黿鰻鰷鵇麜齽龋鰶鱷麉麦麓麘鼫鷌鳛鰲龋鹓黍鼫鰰齩鳵齽黍鰮龋齝鱴鱰鰫鵼鼉鼫鰪鰧龋鹛龇鰦鰥龋龍鰤鰠鴻鰜鳵齨鵝鰘鰕龇齋鼗鴀鰔鰐齽鱫鰏龋鹸齐鸠麦鼉龋鰋麆鳞鰉龋鱔鸮齴齰drupal齽鰈鰅麆鼫鵲鱔鸮龋齐鱯鹫鼷鰁鰁鯽鯽龋鯻鼕鯸齴龋齨鵝鰘鰕龋麁鯵鼴龺鯳鯯齽鯫鯨龋鯥鯵drupal黛鼠鯢鯟鯝鹞麦齽鰔鰐齉

本书共71小节:

评论 (写第一个评论)