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黟鼝鯭鯩鯧鹨麨齺鰙鰗齈

本书共83小节:

评论 (写第一个评论)