Craft CMS Summit 2014: Element Types & Plugin Development

Craft CMS Summit 2014: Element Types & Plugin Development

8b3497b674fa91ba29bbcc60ebc4c00b?s=128

Ben Croker

June 17, 2014
Tweet

Transcript

  1. Element Types & Plugin Development Ben Croker • @ben_pylo •

    Craft CMS Summit 2014
  2. None
  3. ExpressionEngine Add-Ons Craft Plugins

  4. Lead Developer

  5. Dublin (Ireland) ! Vienna (Austria)

  6. None
  7. None
  8. Craft’s Architecture

  9. Caching • Logging • Validation • Authentication • Internationalisation

  10. MVC

  11. Controller Model View Request

  12. Controller View Record Database Controller Layer Data Layer Request

  13. Craft MVC

  14. Controller Template Request Service Services Record Database Controller Layer Service

    Layer Data Layer Router Request Routing Layer
  15. Controller Template Request Service Services Record Database Controller Layer Service

    Layer Data Layer Router Request Routing Layer
  16. Routing

  17. Resource Request URI contains resource trigger (“cpresources” by default) Action

    Request * URI contains action trigger (“actions” by default) or “action” parameter Element Request URI matches that of an element (entry, category or plugin) Dynamic Route URI matches a dynamic route in routes.php or as defined in control panel Template URI is a valid template path 404 URI cannot be resolved
  18. Plugin Development

  19. validator controllers elementtypes fieldtypes models records resources services templates variables

    ValidatorPlugin.php
  20. None
  21. Services

  22. None
  23. Records

  24. None
  25. Sample Plugins

  26. Element Types

  27. None
  28. None
  29. app elementtypes AssetElementType.php CategoryElementType.php EntryElementType.php GlobalSetElementType.php MatrixBlockElementType.php TagElementType.php UserElementType.php

  30. None
  31. Localisable Filterable Relatable Linkable

  32. E-Commerce

  33. Products & Orders = Entries Products = Entries; Orders =

    Distinct Products & Orders = Distinct
  34. Products & Orders = Native Elements

  35. Demo

  36. Unified Elemental Content Type Consistent User Experience

  37. What you knew before ! Craft

  38. Thank You Ben Croker • @ben_pylo • Craft CMS Summit

    2014