Your SlideShare is downloading. ×
0
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Drupalcamp Nantes - Adapter Drupal
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Drupalcamp Nantes - Adapter Drupal

790

Published on

Présentation de Florian Lorétan (http://twitter.com/#!/floretan)

Présentation de Florian Lorétan (http://twitter.com/#!/floretan)

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
790
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Adapter Drupal Florian Lorétan
  • 2. Adapter Drupal
  • 3. Adapter Drupal• Pourquoi?
  • 4. Adapter Drupal• Pourquoi?• La méthode
  • 5. Adapter Drupal• Pourquoi?• La méthode• Exemples
  • 6. Adapter Drupal• Pourquoi?• La méthode• Exemples• Conseils
  • 7. Adapter Drupal Pourquoi?
  • 8. Glue Code
  • 9. mymodule.infoname = "My Module"description = "Example custom module"core = 7.xmymodule.module<?php
  • 10. La méthode
  • 11. La méthode• Quoi et pourquoi?
  • 12. La méthode• Quoi et pourquoi?• Quel composant?
  • 13. La méthode• Quoi et pourquoi?• Quel composant?• Quelles données
  • 14. La méthode• Quoi et pourquoi?• Quel composant?• Quelles données• Comment?
  • 15. Un exemple
  • 16. form
  • 17. api.drupal.org
  • 18. hook_form_alter(&$form, &$form_state, $form_id)
  • 19. function mymodule_form_alter(&$form, &$form_state, $form_id) { dpm(‘youpiiiii!’);}
  • 20. Module “Devel” : http://drupal.org/project/develfunction mymodule_form_alter(&$form, &$form_state, $form_id) { dpm(‘youpiiiii!’);}
  • 21. function mymodule_form_alter(&$form, &$form_state, $form_id) { dpm($form_id);}
  • 22. function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == article_node_form) { dpm($form); }}
  • 23. function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == article_node_form) { $form[actions][submit][#value] = t(Publish this article); }}
  • 24. quelques exemples
  • 25. function mymodule_menu_alter(&$items) { $items[user/register][type] = MENU_CALLBACK; $items[user/password][type] = MENU_CALLBACK;}
  • 26. function mymodule_views_post_execute($view) { if ($view->name == some_view) { drupal_set_message(t(There are @count results matching your criteria., array(@count => $view->total_rows))); }}
  • 27. Attention!• Sécurité• Commentaires• Dépendances• Références• Contribuez!

×