Upgrade to Pro — share decks privately, control downloads, hide ads and more …

初心者向けDrupalハンズオン / Drupal hands-on for Beginners

初心者向けDrupalハンズオン / Drupal hands-on for Beginners

Transcript

  1. 1 2࣌ؒͰ΢ΣϒαΠτߏஙʂ DrupalϋϯζΦϯ ΞΫΠΞδϟύϯ 3

  2. ΦʔϓϯιʔεCMSʮDrupalʯ֓ཁ • 2001೥ʹΦʔϓϯιʔεͱͯ͠ެ։͞ΕͨPHP੡ͷCMS • GPLόʔδϣϯ2Ҏ߱ͷϥΠηϯεʹج͖ͮ഑෍ • ੈքͰ࠷΋ϙϐϡϥʔͳCMSͷҰͭ DrupalͷެࣜΩϟϥΫλʔ Druplicon

  3. ਺ࣈͰݟΔDrupal 100ສ+ WebαΠτͰՔಇ 46,000ਓ+ Drupal։ൃऀ 11ສਓ+ ΞΫςΟϒ 
 ίϯτϦϏϡʔλʔ 140ສ+

    ίϛϡχςΟϝϯόʔ 20೥ Drupalͷ೥ྸ 9 ࠷৽ϝδϟʔόʔδϣ ϯ
  4. ۀք໰Θͣɺੈքͷ໊ͩͨΔϒϥϯυ͕DrupalΛ࠾༻ ஶ໊ͳDrupal࠾༻اۀ • NASA • ࠃ࿈ • Πʔελϯۜߦ • ΦοΫεϑΥʔυେֶ

    • ςεϥɾϞʔλʔζ • Τϧϝε • ΦʔετϥϦΞ੓෎ • ΞϝοΫε • IBM ༷ʑͳλΠϓͷWebαΠτ/WebαʔϏεͰར༻͞Ε͍ͯ·͢ • ίʔϙϨʔταΠτ • Φ΢ϯυϝσΟΞ • ϒϥϯυαΠτ • EίϚʔεαΠτ • ࣾ಺ϙʔλϧ • SNSαΠτ
  5. Πϯετʔϧ͙ͯ͢͠ʹ࢖͑ ΔCMSͷΠϯλʔϑΣʔε ϑϨʔϜϫʔΫͳΒͰ͸ͷ ൚༻ੑͷߴ͞ Drupal CMSͱͯ͠ɺίϯςϯπฤूऀɺ։ൃऀͷχʔζ྆ํΛຬͨ͢ ਫͷΑ͏ʹ͠ͳ΍͔ʹɺ൚༻ੑߴ͍ϓϥοτϑΥʔϜ

  6. ͙͢ʹ࢖͑Δඪ४ػೳ ίϯςϯπͷ౤ߘɾදࣔ – ίϯςϯπλΠϓͷఆٛ 
 λΫιϊϛʔͱϘΩϟϒϥϦʔ – λά෇͚ػೳ 
 Ϣʔβʔͱϩʔϧ؅ཧ

    – ࡉ͔͍୯Ґͷݖݶɺϩʔϧ࡞੒ 
 ϝσΟΞ؅ཧ – ը૾΍ಈըϑΝΠϧͳͲΛҰݩ؅ཧ 
 ViewsʢΫΤϦϏϧμʔʣ – ϊʔίʔυͰSQLจΛ࡞੒ͯ͠ 
 ίϯςϯπͷநग़ 
 ίϯςϯπͷ౷ܭ؅ཧ – ϖʔδຖͷΞΫηε਺ͷूܭ ݕࡧ – ඪ४Ͱ༻ҙ͞Ε͍ͯΔݕࡧػೳ 
 Ωϟογϯά – ಈతίϯςϯπͷΩϟογϡ 
 ଟݴޠػೳ – αΠτͷଟݴޠల։ 
 ঝೝϫʔΫϑϩʔ – ίϯςϯπͷঝೝϫʔΫϑϩʔΛࣗ༝ʹఆٛ 
 Web API – Drupal ಺ͷίϯςϯπΛ Web API ͱͯ͠ѻ͏ – εϚϗΞϓϦɺσδλϧαΠωʔδͳͲ 
 Ϛϧννϟωϧ΁ͷ഑৴ etc... CMSͱͯ͠ίϯςϯπฤूऀɺϚʔέλʔʹ༏͍͠ػೳͷఏڙ
  7. Drupalͷػೳ֦ுͱΤίγεςϜ ج൫ – ΤϯςΟςΟγεςϜʹΑͬͯɺߏ଄Խ͞ΕͨίϯςϯπΛߏஙͰ͖·͢ɻ – Drupal͸ʮϞδϡʔϧʯͱݺ͹ΕΔখ͍͞ػೳͷ୯ҐΛෳ਺૊Έ߹Θͤͯߏ੒͍͖ͯ͠·͢ɻʢϞδϡϥʔࣜϑ ϨʔϜϫʔΫʣ DrupalΤίγεςϜ – 4ສݸҎ্ͷίϯτϦϏϡʔτϞδϡʔϧ͕ίϛϡχςΟ͔Βఏڙ͞Ε͍ͯΔͨΊɺ։ൃΛͤͣʹػೳΛ௥Ճ͢Δ͜ͱ͕

    ՄೳͰ͢ɻ – ଞʹ΋ςʔϚ΍σΟετϦϏϡʔγϣϯʢҰࣜύοέʔδʣ͕ଟ਺ެ։͞Ε͍ͯ·͢ɻ DevOps – Drupal͸2015೥͔ΒOOPʢΦϒδΣΫτࢦ޲ʣɺSymfonyϑϨʔϜϫʔΫΛ࠾༻͠ɺ֦ுੑͱอकੑ͕޲্͠ ·ͨ͠ɻ – ߏ੒؅ཧπʔϧͱݺ͹ΕΔɺDrupalͷઃఆ಺༰ΛYAMLͰ؅ཧͰ͖Δػೳ͕ඪ४Ͱ༻ҙ͞Ε͓ͯΓɺνʔϜ։ ൃɺܧଓ։ൃʹڧ͍Ͱ͢ɻ ൚༻ੑߴ͍γεςϜઃܭͱܧଓత։ൃʹඞཁͳػೳ͕ἧ͍ͬͯΔ
  8. WordPressͱͷҧ͍ WordPress͸খʙதن໛αΠτɺDrupal͸େن໛αΠτʹڧ͍ʂ DrupalͷڧΈʢWordPressͷऑΈʣ – ߏ଄Խίϯςϯπ – ΤϯςΟςΟγεςϜ – API-First ࢦ޲

    – ܧଓతͳ։ൃ – OOPͷ࠾༻ – ߏ੒؅ཧπʔϧͰ 
 ߏ੒ͱσʔλϕʔεΛ෼཭ DrupalͷऑΈʢWordPressͷڧΈʣ – ॳ৺ऀʹͱͬͯ 
 ͱ͖ͬͭͮΒ͍ʢUI/UXʣ – ೔ຊޠࢿྉ͕গͳ͍ https://medium.com/sthlmconnection/drupal- wordpress-and-all-the-rest-90cb9b798d0c ϓϩδΣΫτͷෳࡶ͞ͱ ࠷దͳϓϥοτϑΥʔϜ ࢢ৔ͷॅΈ෼͚ https://w3techs.com/technologies/details/cm-drupal ՔಇαΠτ਺ τ ϥ ϑ Ο ο Ϋ ྔ
  9. ଞ঎༻CMSͱͷҧ͍ – Drupal͸ϥΠηϯεඅ༻͕͔͔Βͳ͍ͷͰɺίετ Λ཈͑ͯߏஙͰ͖Δ 
 – Drupalͷ։ൃʹܞΘ͍ͬͯΔ։ൃऀ(ίϯτϦ Ϗϡʔλʔ)͕ੈքதʹ11ສਓ͍ΔͷͰɺػೳվળ΍ όάϑΟοΫε͕ૣ͍ –

    6ϲ݄͝ͱʹ৽ػೳ͕ϦϦʔε 
 – Drupal͸ΦʔϓϯιʔεͳͷͰ 
 ϕϯμʔϩοΫΠϯ͕ແ͍ ΦʔϓϯιʔεͳΒͰ͸ͷར఺ ੈքτοϓاۀͷCMS࠾༻ Fortune 500ʹ͓͚ΔDrupalͷ࠾༻اۀྫ: GE (Fortune #9)ɺJ&J (#39)ɺNBC Universal (unit of #44 Comcast)ɺPfizer (#51)ɺ eBay (#180)
  10. ੈքதͷDrupalίϛϡχςΟ ೔ຊͰͷίϛϡχςΟ׆ಈ • Drupal Meetup Tokyo ◦ https://drupal-tokyo.connpass.com/ • Drupal

    Meetup Ӌాɺ๛ాɺകా ◦ https://drupal-meetup-haneda.connpass.com/ • Drupal ͬ͞ΆΖ ◦ https://drupalsapporo.connpass.com • DrupalΛ΍ֶ͘͞͠Ϳษڧձ ◦ https://cmslabo.doorkeeper.jp/ DrupalCon • ੈք࠷େͷDrupalΧϯϑΝϨϯε • ੈք֤஍͔Β3,000ਓҎ্͕ࢀՃ • χϡʔΦʔϦϯζɺϜϯόΠɺόϧηϩφ...
  11. DrupalͱΞΫΠΞͷؔ܎ DrupalͷੜΈͷ਌Ͱ͋Δ υϦεɾόΠλϧτ͕૑ۀͨ͠اۀ • ΤϯλʔϓϥΠζͰ΋҆৺ͯ͠DrupalΛѻ͑ΔΑ͏ʹ DrupalͷϗεςΟϯάͱ༗ঈαϙʔτΛఏڙ • Redhat͕LinuxΛࢿຊతʹࢧԉ͢ΔΑ͏ʹɺ 
 ΞΫΠΞ͕DrupalΛࢿຊతʹࢧԉ

    • Drupal։ൃʹίϛοτ͢ΔΤϯδχΞΛ࠾༻ • Drupal 8ͷ্Ґ20ਓͷߩݙऀͷ͏ͪ 
 5ਓ͕ΞΫΠΞʹॴଐ • ੈքͰ།ҰɺDrupalೝఆࢼݧΛఏڙ
  12. Drupal ॳ৺ऀ޲͚ 
 ϋϯζΦϯ 12

  13. ϋϯζΦϯ֓ཁ ॳ৺ऀ޲͚ɾϊϯίʔσΟϯάͰ 
 γϯϓϧͳҿ৯ళ(ΧϑΣ)αΠτΛ࡞੒͠·͢ ॴཁ࣌ؒɿ1.5࣌ؒʙ2࣌ؒ 13 ϋϯζΦϯͰߦ͑ΔΑ͏ʹͳΔ͜ͱ • DrupalϩʔΧϧ؀ڥߏங •

    ϕʔγοΫͳίϯςϯπ؅ཧ • Viewsػೳ • ΧελϜίϯςϯπλΠϓͷ׆༻ • ֦ுϞδϡʔϧͷΠϯετʔϧͱ༗ޮԽ • DrushίϚϯυ
  14. ϋϯζΦϯखॱ 1. LandoΛ༻͍ͨDrupalϩʔΧϧ։ൃ؀ڥߏங 
 ͱDrupalͷΠϯετʔϧ 2. جຊతͳϖʔδͷ࡞੒ํ๏ 3. Ϗϡʔζ(Views)Λ࢖༻ͨ͠ 


    ಈతϦετͷ࡞੒ 4. ΧελϜίϯςϯπλΠϓΛ࡞Ζ͏ 5. ComposerͱdrushΛ༻͍ͨ 
 ֦ுϞδϡʔϧͷΠϯετʔϧํ๏ 14
  15. DrupalͷγεςϜཁ݅ͱґଘϥΠϒϥϦ ※Drupal 9.1.x ͷ৔߹ γεςϜཁ݅ – Apache 2.4.7 Ҏ্ –

    Nginx 0.7.x Ҏ্ – PHP 7.3 Ҏ্ 
 ※ PHP 8.0 ʹؔͯ͠͸ Drupal 9.1 Ͱਖ਼ࣜʹαϙʔτ – MySQL 5.7.8 Ҏ্ – MariaDB 10.3.7 Ҏ্ – SQLite 3.26 Ҏ্ – (pg_trgm ϞδϡʔϧΛඋ͑ͨ) 
 PostgreSQL 10 Ҏ্ ओͳαʔυύʔςΟʔͷґଘؔ܎ – Symfony 4.4 – Twig 2 – CKEditor 4 – PHPUnit 8 https://www.drupal.org/docs/system-requirements
  16. Drupal؀ڥͷ༻ҙ – ༗໊ͳDrupalͷϩʔΧϧ։ൃ؀ڥߏஙπʔϧ – Lando – Docksal – DDEV –

    Drupal VM 
 – ࠓճ͸ྫͱͯ͠ɺLandoͰ 
 Drupal 9؀ڥΛߏங͢ΔखॱΛ঺հ
  17. LandoΛ༻͍ͨDrupalͷϩʔΧϧ։ൃ؀ڥͷ࡞੒ # ϓϩδΣΫτσΟϨΫτϦͷ࡞੒ͱҠಈ $ mkdir my-d9app-aug11 && cd my-d9app-aug1 1

    # LandoͷॳظԽ $ lando init --source cwd --recipe drupal9 --webroot web --name my-d9app-aug1 1 # ίϯςφͷىಈ $ lando star t …(লུ).. . APPSERVER URLS https://localhost:5501 7 http://localhost:5501 8 http://my-d9app-aug11.lndo.site / https://my-d9app-aug11.lndo.site / # DrupalϓϩδΣΫτͷ࡞੒ $ lando composer create-project drupal/recommended-project tmp && cp -r tmp/. . && rm -rf tm p # DrushʢDrupalͷίϚϯυϥΠϯπʔϧʣͷΠϯετʔϧ $ lando composer require drush/drush DrupalϓϩδΣΫτ࡞੒ʙίϯςφͷىಈ Docker, LandoͷΠϯετʔϧखॱ͸ল͖·͢
  18. DrupalͷॳظΠϯετʔϧ – ϒϥ΢βͰϩʔΧϧαʔόʔʹΞΫηε – http://my-drupal9-app.lndo.site:8080/ – ΠϯλϥΫςΟϒΠϯετʔϥʔ͕ىಈ – ϓϩϑΝΠϧ͸ʮඪ४ʯΛબ୒ –

    σʔλϕʔεͷ઀ଓઌ৘ใ͸ 
 lando info ίϚϯυͰ֬ೝ LandoΛ༻͍ͨDrupalͷϩʔΧϧ։ൃ؀ڥͷ࡞੒ ͓·͚ɿLandoͷૢ࡞ – lando stop – ίϯςφͷఀࢭ – lando ssh – ίϯςφͷγΣϧʹΞΫηε͢Δ
  19. DrupalͷॳظΠϯετʔϧ͕׬ྃ͢Δͱɺ͜ͷΑ͏ͳը໘্ཱ͕͕ͪΓ·͢ɻ LandoΛ༻͍ͨDrupalͷϩʔΧϧ։ൃ؀ڥͷ࡞੒

  20. ؅ཧπʔϧόʔͷϝχϡʔ߲໨ͷղઆ ৽͍͠ίϯςϯπͷ࡞੒ɺ طଘͷίϯςϯπͷҰཡද ࣔɺ؅ཧΛߦ͍·͢ɻ αΠτͷ͞·͟·ͳઃఆ ϖʔδ΁ͷϦϯΫؚ͕·Ε ͍ͯ·͢ɻ ϩάɺߋ৽৘ใɺαΠτͷ ঢ়ଶʹؔ͢ΔϦϯΫؚ͕· Ε͍ͯ·͢ɻ

    ςʔϚͷઃఆΛ؅ཧ͠· ͢ɻ ϒϩοΫɺίϯςϯπλΠϓɺ ϝχϡʔɺλΫιϊϛʔͳͲα Πτͷߏ଄Λ؅ཧ͢ΔͨΊͷ ػೳʹΞΫηεͰ͖·͢ɻ ϞδϡʔϧͷΠϯετʔ ϧɺΞϯΠϯετʔϧΛ؅ ཧ͠·͢ɻ Ϣʔβʔɺ໾ׂɺݖݶΛ؅ ཧ͠·͢ɻ ΠϯετʔϧࡁΈϞδϡʔ ϧͷϔϧϓτϐοΫΛҰཡ දࣔ͠·͢ɻ https://www.drupal.org/docs/user_guide/en/config-overview.html
  21. ϋϯζΦϯखॱ 1. LandoΛ༻͍ͨDrupalϩʔΧϧ։ൃ؀ڥߏங 
 ͱDrupalͷΠϯετʔϧ 2. جຊతͳίϯςϯπͷ࡞੒ํ๏ 3. Ϗϡʔζ(Views)Λ࢖༻ͨ͠ 


    ಈతϦετͷ࡞੒ 4. ΧελϜίϯςϯπλΠϓΛ࡞Ζ͏ 5. ComposerͱdrushΛ༻͍ͨ 
 ֦ுϞδϡʔϧͷΠϯετʔϧํ๏ 21
  22. جຊతͳίϯςϯπͷ࡞੒ํ๏ ࣍ͷίϯςϯπΛ࡞੒͠·͢ɻ – τοϓϖʔδ – τοϓϖʔδʹؔͯ͠͸ɺαΠτͷτοϓϖʔδͱೝࣝ͢ ΔΑ͏ͳઃఆ΋ಉ࣌ʹߦ͍͖ͬͯ·͢ɻ 
 – χϡʔεهࣄ

    × 2
  23. τοϓϖʔδͷ࡞੒ 1. ʮίϯςϯπʯʹҠಈ 2. ʮίϯςϯπΛ௥ՃʯΫϦοΫ 3. ʮجຊϖʔδʯΫϦοΫ 5. อଘ 4.

    λΠτϧͱ 
 ຊจΛฤू
  24. τοϓϖʔδͷ࡞੒ 6. ࡞੒ͨ͠τοϓϖʔδͷ 
 ʮ/node/xxʯͱ͍͏URLύεΛίϐʔ͓ͯ͘͠ ͜ΕͰτοϓϖʔδ༻ͷϖʔδ͕Ұͭ࡞੒Ͱ͖·ͨ͠ɻ ͜ͷϖʔδΛαΠτͷτοϓϖʔδͱೝࣝͤ͞ΔͨΊʹɺ࣍͸ઃఆΛ͍͡Γ·͢ɻ ઃఆͰඞཁʹͳΔͷͰɺ࡞੒ͨ͠ϖʔδͷύεΛίϐʔ͓͖ͯ͠·͢ɻ

  25. τοϓϖʔδͷઃఆ 7. ʮ؀ڥઃఆʯʹҠಈ 8. ΫϦοΫ 9. ઌ΄Ͳίϐʔͨ͠ 
 URLύεΛϖʔετ 10.

    อଘ
  26. τοϓϖʔδͷઃఆ ͜ΕͰɺ࡞੒ͨ͠ϖʔδ͕αΠτͷτοϓϖʔδͱೝࣝ͞ΕΔΑ͏ʹͳΓ·ͨ͠ɻ αΠτͷϧʔτURLʹҠಈͯ͠ɺઌ΄Ͳ࡞੒ͨ͠ϖʔδͱಉ͡ϖʔδ͕දࣔ͞Ε͍ͯΔ͔֬ೝ͠·͢ɻ http://xxx.xxx.xxx:xxxx/ ʹΞΫηεʂ

  27. χϡʔεهࣄͷ࡞੒ τοϓϖʔδ༻ͷϖʔδΛ࡞੒ͨ࣌͠ͱಉ͡ཁྖͰɺχϡʔεهࣄ΋࡞੒ͯ͠Έ·͢ɻ 1. ʮίϯςϯπʯʹҠಈ 2. ΫϦοΫ 3. ΫϦοΫ

  28. 4. λΠτϧɺຊจɺ 
 URLΤΠϦΞεͷ3ՕॴΛฤू λΠτϧɿ2݄ͷӦۀ೔ Bodyɿ2݄͸ɺఆٳ೔ʢ໦༵೔ʣҎ֎͸ٳ·ͣ Ӧۀ͠·͢ʂ URLΤΠϦΞεɿ/news/information-february 5. อଘ

    χϡʔεهࣄͷ࡞੒ ޙ΄ͲχϡʔεهࣄͷҰཡϖʔδΛ࡞੒͢ΔͷͰɺ ಉ͡खॱͰ΋͏ҰͭϖʔδΛ࡞੒͓͖ͯ͠·͢ɻ
  29. ϋϯζΦϯखॱ 1. LandoΛ༻͍ͨDrupalϩʔΧϧ։ൃ؀ڥߏங 
 ͱDrupalͷΠϯετʔϧ 2. جຊతͳίϯςϯπͷ࡞੒ํ๏ 3. Ϗϡʔζ(Views)Λ࢖༻ͨ͠ 


    ಈతϦετͷ࡞੒ 4. ΧελϜίϯςϯπλΠϓΛ࡞Ζ͏ 5. ComposerͱdrushΛ༻͍ͨ 
 ֦ுϞδϡʔϧͷΠϯετʔϧํ๏ 29
  30. Viewsͱ͸ – ΢ΣϒαΠτ্ͷίϯςϯπͷϦετΛ࡞੒͢Δػೳ – ϑΟϧλϦϯά΍ιʔτɺϑΥʔϚοτʢςʔϒϧܗࣜͳͲʣͷࢦ ఆ͕ߦ͑Δ – ίΞͷViewsϞδϡʔϧ͸ϏϡʔͷදࣔΛॲཧ͠ɺίΞͷViews UI ϞδϡʔϧΛ࢖༻ͯ͠؅ཧը໘͔ΒϏϡʔΛ࡞੒ɺฤूͰ͖Δ

    
 – ViewsΛ࢖༻ͯ͠දࣔͰ͖Δ΋ͷͷྫ – هࣄͷϦετ – ళฮ৘ใͷϦετ – αΠτͷ࠷৽ίϯςϯπͷϦετ – αΠτ্ͷϢʔβʔͷϦετ https://www.drupal.org/docs/user_guide/en/views-concept.html
  31. Viewsͷσʔλͷग़ྗܗࣜͷྫ ςʔϒϧܗࣜ άϦου JSON / XML ※ RESTful Web Services

    Ϟδϡʔϧ͕ඞཁ ϒϩοΫ HTMLϦετ
  32. ViewsΛ࢖ͬͯχϡʔεهࣄҰཡϖʔδΛ࡞੒ 1. ʮαΠτߏஙʯʹҠಈ 2. ʮϏϡʔζʯΫϦοΫ 3. ʮϏϡʔΛ௥ՃʯΫϦοΫ Viewsػೳͷ֓ཁ͕Θ͔ͬͨͱ͜ΖͰɺઌ΄Ͳ࡞੒ͨ͠χϡʔ εهࣄͷҰཡϖʔδΛViewsͰ࡞੒͠·͢ɻ

  33. ViewsΛ࢖ͬͯχϡʔεهࣄҰཡϖʔδΛ࡞੒ 4. Ϗϡʔͷ໊લΛೖྗ 5. ʮهࣄʯΛબ୒ 6. νΣοΫϘοΫεʹνΣοΫ͠ ͯɺPage titleͱύεΛೖྗ 


    Page titleɿχϡʔε 
 ύεɿnews 7. อଘ 8. αΠτʹ໭Δ
  34. ViewsΛ࢖ͬͯχϡʔεهࣄҰཡϖʔδΛ࡞੒ ViewsػೳΛ࢖͏͜ͱͰɺίϯςϯπͷಈతͳϦετΛ؅ཧը໘͔Β࡞੒͢Δ͜ͱ͕ՄೳͰ͢ɻ

  35. ϋϯζΦϯखॱ 1. LandoΛ༻͍ͨDrupalϩʔΧϧ։ൃ؀ڥߏங 
 ͱDrupalͷΠϯετʔϧ 2. جຊతͳίϯςϯπͷ࡞੒ํ๏ 3. Ϗϡʔζ(Views)Λ࢖༻ͨ͠ 


    ಈతϦετͷ࡞੒ 4. ΧελϜίϯςϯπλΠϓΛ࡞Ζ͏ 5. ComposerͱdrushΛ༻͍ͨ 
 ֦ுϞδϡʔϧͷΠϯετʔϧํ๏ 35
  36. ίϯςϯπΤϯςΟςΟͱ͸ ίϯςϯπΞΠςϜ ίϯςϯπλΠϓ هࣄ ຊจ ຊจ ը૾ λά ίϯςϯπλΠϓ ళฮ

    ຊจ ը૾ ి࿩൪߸ ΤϯςΟςΟλΠϓ … ༻్ɺ໨తʹԠͯ͡άϧʔϓԽ ΤϯςΟςΟαϒλΠϓ … ΤϯςΟςΟλΠϓΛࡉ෼Խ ϑΟʔϧυ … ςΩετɺը૾ɺ೔෇ͳͲ ܕͷܾ·ͬͨσʔλɻ࠶ར༻͕Մೳ • τοϓϖʔδ • ձࣾ֓ཁ • ... • ϒϩάهࣄ1 • ϒϩάهࣄ2 • ... • ौ୩ຊళ • ݪ॓ళ • ... ίϯςϯπΤϯςΟςΟ … ߏ଄Խ͞Εͨ୯ҰͷΞΠςϜ … ڞ௨ͷΠϯλʔϑΣʔεͰσʔλͷ ΍ΓͱΓ͕Ͱ͖Δ λΫιϊϛʔ ϘΩϟϒϥϦʔ λά ϘΩϟϒϥϦʔ ΧςΰϦ ը૾ ը૾ • χϡʔε • ೔ৗ • ... ίϯςϯπλΠϓ جຊϖʔδ ςΩετ • ৽঎඼ • ਓؾهࣄ • ... ΤϯςΟςΟγεςϜʹΑͬͯɺߏ଄Խ͞ΕͨίϯςϯπΛߏஙͰ͖·͢ɻ
  37. αΠττοϓ ᵓᴷᴷ ঎඼Ұཡ │ ᵓ λϐΦΧϛϧΫςΟʔ │ ᵓ ຣ஡λϐΦΧ │

    └ ... ᵓᴷᴷ ళฮҰཡ │ ᵓ ौ୩ຊళ │ └ ... ᵓᴷᴷ χϡʔε │ ᵓ ৽঎඼ͷ͓஌Βͤ │ └ ... └── ͓໰͍߹Θͤ ҿ৯ళ΢ΣϒαΠτ 
 ʮλϐΦΧ٤஡ళ ·Δ஡ʯ 
 Λྫʹߟ͑ͯΈΑ͏ ίϯςϯπߏ଄ͷܭըͷྫ ΤϯςΟςΟ λΠϓ ΤϯςΟςΟ αϒλΠϓ ϑΟʔϧυ ΤϯςΟςΟ ʢར༻ྫʣ ίϯςϯπΞΠςϜ جຊϖʔδ - λΠτϧ - ຊจ - τοϓϖʔδ - ձࣾ֓ཁ ίϯςϯπΞΠςϜ هࣄ - λΠτϧ - ຊจ - ը૾ - λάʢࢀরʣ - ৽঎඼ͷ͓஌Βͤ - Ӧۀ࣌ؒͷ͓஌Βͤ ίϯςϯπΞΠςϜ ళฮ - ళฮ໊ - ຊจ - ը૾ - ి࿩൪߸ - ौ୩ຊళ - ݪ॓ళ ίϯςϯπΞΠςϜ ঎඼ - ঎඼໊ - ຊจ - ը૾ - λϐΦΧϛϧΫςΟʔ - ຣ஡λϐΦΧ λΫιϊϛʔλʔϜ ళฮಛ௃ - ຊจ - றं৔͋Γ - ݶఆ঎඼͋Γ ͓໰͍߹Θͤ 
 ϑΥʔϜ ΢ΣϒαΠτ 
 ϑΟʔυόοΫ - ϝʔϧΞυϨε - ໊݅ - ϝοηʔδ - ͓໰͍߹Θͤϖʔδ ϢʔβʔϓϩϑΝΠϧ ʢͳ͠ʣ - χοΫωʔϜ - ϓϩϑΟʔϧࣸਅ αΠτʹඞཁͳίϯςϯπ αΠτϚοϓ
  38. ళฮίϯςϯπλΠϓΛ࡞Ζ͏ 1. ʮαΠτߏஙʯʹҠಈ 2. ʮίϯςϯπλΠϓʯ 
 ΫϦοΫ 3. ʮ௥ՃʯΫϦοΫ ి࿩൪߸ϑΟʔϧυɺॅॴϑΟʔϧυΛ࣋ͭʮళฮʯίϯςϯπλΠϓΛࣗ࡞ͯ͠Έ·͢ɻ

    ·ͣ͸ίϯςϯπλΠϓΛ௥Ճ͠·͢ɻ
  39. 6. ࡞੒ͨ͠τοϓϖʔδͷ 
 ʮ/node/xxʯͱ͍͏URLύεΛίϐʔ͢Δ 4. ֤छ৘ใΛೖྗ ໊લɿళฮ৘ใ આ໌ɿళฮ৘ใʹؔ͢ΔهࣄͰ͢ɻ λΠτϧϑΟʔϧυͷϥϕϧɿళฮ໊ 6.

    อଘ 5. νΣοΫΛ֎͢ ళฮίϯςϯπλΠϓΛ࡞Ζ͏
  40. ళฮίϯςϯπλΠϓΛ࡞Ζ͏ 7. ϑΟʔϧυͷ௥Ճ ళฮίϯςϯπλΠϓʹɺి࿩൪߸ϑΟʔϧυΛ௥Ճ͍͖ͯ͠·͢ɻ

  41. ళฮίϯςϯπλΠϓΛ࡞Ζ͏ 9. อଘ 8. ֤छ৘ใΛೖྗ 
 ৽͍͠ϑΟʔϧυɿςΩετ ʢϓϨʔϯʣ ϥϕϧɿి࿩൪߸ 10.

    ࠷େ௕Λ20ʹઃఆ 11. อଘ 12. อଘ
  42. ళฮίϯςϯπλΠϓΛ࡞Ζ͏ 13. ϑΟʔϧυͷ௥Ճ ళฮίϯςϯπλΠϓʹి࿩൪߸ϑΟʔϧυ͕௥ՃͰ͖·ͨ͠ɻ ࣍͸ॅॴϑΟʔϧυΛ௥Ճ͍͖ͯ͠·͢ɻ

  43. ళฮίϯςϯπλΠϓΛ࡞Ζ͏ 15. อଘ 14. ֤छ৘ใΛೖྗ 
 ৽͍͠ϑΟʔϧυɿςΩετ ʢϓϨʔϯʣ ϥϕϧɿॅॴ 16.

    อଘ 17. อଘ
  44. ళฮίϯςϯπλΠϓΛ࡞Ζ͏ ళฮίϯςϯπλΠϓ͕࡞੒Ͱ͖·ͨ͠ɻ ͜ΕͰɺखॱ2ʮجຊతͳίϯςϯπͷ࡞੒ํ๏ʯͰ͝঺հͨ͠Α͏ͳखॱͰ ళฮϖʔδΛ࡞੒Ͱ͖ͨΓɺViewsΛ࢖ͬͯళฮҰཡϖʔδΛ࡞੒ͨ͠ΓͰ͖·͢ɻ ίϯςϯπλΠϓҰཡʹɺ ʮళฮʯίϯςϯπλΠϓ͕௥Ճ͞Εͨʂ

  45. ϋϯζΦϯखॱ 1. LandoΛ༻͍ͨDrupalϩʔΧϧ։ൃ؀ڥߏங 
 ͱDrupalͷΠϯετʔϧ 2. جຊతͳίϯςϯπͷ࡞੒ํ๏ 3. Ϗϡʔζ(Views)Λ࢖༻ͨ͠ 


    ಈతϦετͷ࡞੒ 4. ΧελϜίϯςϯπλΠϓΛ࡞Ζ͏ 5. ComposerͱdrushΛ༻͍ͨ 
 ֦ுϞδϡʔϧͷΠϯετʔϧํ๏ 45
  46. Ϟδϡʔϧͱ͸ – খ͞ͳػೳͷ୯Ґ – ෳ਺ϞδϡʔϧΛ૊Έ߹ΘͤͯαΠτΛߏங 
 – 3ͭͷछྨʹ෼ྨ – ίΞϞδϡʔϧ

    – ίΞ։ൃऀ͕؅ཧ͢Δ – ඪ४ػೳ΋ෳ਺ͷϞδϡʔϧͰߏ੒ – ྫʣϒϩοΫɺviews(ΫΤϦϏϧμʔ) 
 ϑΟʔϧυɺݕࡧɺϢʔβʔ؅ཧ...etc – ίϯτϦϏϡʔτϞδϡʔϧ – ίϯτϦϏϡʔλʔ͕؅ཧ͢Δ – 4ສݸҎ্ͷެ։Ϟδϡʔϧ 
 https://www.drupal.org/project/project_module – ΧελϜϞδϡʔϧ – ֤ϓϩδΣΫτͷͨΊʹಠࣗͰ։ൃ͢Δ Ϟδϡʔϧ͸౓ʑϨΰϒϩοΫʹྫ͑ΒΕΔ
  47. ϞδϡʔϧͷΠϯετʔϧํ๏͍Ζ͍Ζ 1. Drupalͷ؅ཧը໘͔Βߦ͏ 2. खಈͰίʔυϕʔεʹ഑ஔ͢Δ 3. ComposerͰߦ͏ɹɹɹ← ࠓճઆ໌͠·͢ ίϯτϦϏϡʔτϞδϡʔϧͷμ΢ϯϩʔυํ๏͸৭ʑ༻ҙ͞Ε͍ͯ·͕͢ɺ 


    ࠓճ͸ComposerͰߦ͏ํ๏Λ঺հ͠·͢ɻ
  48. ComposerͰϞδϡʔϧΛΠϯετʔϧ͢Δ 1. ϞδϡʔϧͷϓϩδΣΫτϖʔδͷ 
 όʔδϣϯ൪߸ΛΫϦοΫ 2. ComposerͰμ΢ϯϩʔυ͢Δ৔߹ͷίϚϯυྫΛ֬ೝ 
 
 


    
 3. DrupalͷϓϩδΣΫτϧʔτʹҠಈ͠ɺ࣍ͷίϚϯυΛ࣮ߦ 
 $ composer require 'drupal/admin_toolbar:^3.0' ʢ༨ஊʣLando؀ڥͰ͸ίϚϯυͷ಄ʹ lando Λ͚ͭͯɺ࣍ͷίϚϯυͰ΋࣮ߦͰ͖·͢Αʂ 
 $ lando composer require 'drupal/admin_toolbar:^3.0' ʮAdmin ToolbarʯϞδϡʔϧΛྫʹࢼͯ͠Έ·͢ɻ ※DrupalϓϩδΣΫτϧʔτʹcomposer.json͕ଘࡏ͢Δ͜ͱ͕લఏ 
 ※composerίϚϯυ͕࢖༻Ͱ͖Δ͜ͱ͕લఏ
  49. Ϟδϡʔϧͷ༗ޮԽ 1. Drupalͷ؅ཧը໘͔Βߦ͏ 2. DrushͰߦ͏ ←ͬͪ͜Ͱઆ໌ ؅ཧը໘͔Βߦ͏ํ๏΋͋Γ·͕͢ɺ 
 ࠓճ͸DrushίϚϯυͰߦ͏ํ๏Λ঺հ͠·͢ɻ 1.

    ༗ޮԽ͍ͨ͠ϞδϡʔϧͷʮϚγϯ໊ʯΛ֬ೝ 
 Ϛγϯ໊͸ϓϩδΣΫτϖʔδͷURL͔Β൑ผͰ͖·͢ 
 https://www.drupal.org/project/admin_toolbar 2. DrupalͷϓϩδΣΫτϧʔτʹҠಈ͠ɺ࣍ͷίϚϯυΛ࣮ߦ 
 $ vendor/bin/drush pm:enable admin_toolbar ʢ༨ஊʣLando؀ڥͰ͸࣍ͷίϚϯυͰ΋࣮ߦͰ͖·͢Αʂ 
 $ lando drush pm:enable admin_toolbar DrushίϚϯυͰߦ͏Ϟδϡʔϧͷ༗ޮԽ ઌ΄Ͳμ΢ϯϩʔυͨ͠ʮAdmin ToolbarʯϞδϡʔϧΛ༗ޮԽ͠·͢ɻ ※DrushίϚϯυ͕࢖༻Ͱ͖Δ͜ͱ͕લఏ
  50. ϋϯζΦϯखॱ 1. LandoΛ༻͍ͨDrupalϩʔΧϧ։ൃ؀ڥߏங 
 ͱDrupalͷΠϯετʔϧ 2. جຊతͳίϯςϯπͷ࡞੒ํ๏ 3. Ϗϡʔζ(Views)Λ࢖༻ͨ͠ 


    ಈతϦετͷ࡞੒ 4. ΧελϜίϯςϯπλΠϓΛ࡞Ζ͏ 5. ComposerͱdrushΛ༻͍ͨ 
 ֦ுϞδϡʔϧͷΠϯετʔϧํ๏ 50
  51. ϋϯζΦϯ֓ཁ ॳ৺ऀ޲͚ɾϊϯίʔσΟϯάͰ 
 γϯϓϧͳҿ৯ళ(ΧϑΣ)αΠτΛ࡞੒͠·͢ ॴཁ࣌ؒɿ1.5࣌ؒʙ2࣌ؒ 51 ϋϯζΦϯͰߦ͑ΔΑ͏ʹͳΔ͜ͱ • DrupalϩʔΧϧ؀ڥߏங •

    ϕʔγοΫͳίϯςϯπ؅ཧ • Viewsػೳ • ΧελϜίϯςϯπλΠϓͷ׆༻ • ֦ுϞδϡʔϧͷΠϯετʔϧͱ༗ޮԽ • DrushίϚϯυ
  52. ϋϯζΦϯ֓ཁ 52 ϋϯζΦϯͰ৮Εͳ͔ͬͨػೳ • ϒϩοΫγεςϜ • λΫιϊϛʔ • ଟݴޠ •

    Ϣʔβʔ؅ཧɺϩʔϧݖݶ • ϫʔΫϑϩʔ • ϝσΟΞ؅ཧ • REST API • ߏ੒؅ཧ • etc... ॳ৺ऀ޲͚ɾϊϯίʔσΟϯάͰ 
 γϯϓϧͳҿ৯ళ(ΧϑΣ)αΠτΛ࡞੒͠·͢ ॴཁ࣌ؒɿ1.5࣌ؒʙ2࣌ؒ ϋϯζΦϯͰߦ͑ΔΑ͏ʹͳΔ͜ͱ • DrupalϩʔΧϧ؀ڥߏங • ϕʔγοΫͳίϯςϯπ؅ཧ • Viewsػೳ • ΧελϜίϯςϯπλΠϓͷ׆༻ • ֦ுϞδϡʔϧͷΠϯετʔϧͱ༗ޮԽ • DrushίϚϯυ
  53. ࢀߟࢿྉ • Drupal.org ެࣜαΠτ 
 https://drupal.org • ʲ೔ຊޠʳDrupal5෼νϡʔτϦΞϧhttps://www.youtube.com/playlist? list=PLVkpj3GMKNm04iyK8K8T8aQ-e86YVvCQE •

    ʲӳޠʳDrupal5෼νϡʔτϦΞϧ 
 https://www.youtube.com/playlist?list=PLpVC00PAQQxHzlDeQvCNDKkyKRV1G3_vT • ΞΫΠΞೝఆαΠτϏϧμʔࢼݧରࡦߨ࠲ 
 https://www.youtube.com/playlist?list=PLVkpj3GMKNm3e6TF1pOiCQHkF0YULJrJe • ʲCodeZineʳDrupal 9Ͱ࢝ΊΔWebαΠτ։ൃೖ໳https://codezine.jp/article/ corner/819 53
  54. ࢀߟࢿྉ • Drupal 9 Web։ൃ͜ͱ͸͡Ί (ٕज़ͷઘγϦʔζ) 
 https://www.amazon.co.jp/dp/B0922326NR 54

  55. 55