• Like
  • Save
Drupalcamp Nantes - Adapter Drupal
Upcoming SlideShare
Loading in...5
×
 

Drupalcamp Nantes - Adapter Drupal

on

  • 907 views

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

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

Statistics

Views

Total Views
907
Views on SlideShare
811
Embed Views
96

Actions

Likes
0
Downloads
11
Comments
0

2 Embeds 96

http://drupalcamp.fr 78
http://nantes2011.drupalcamp.fr 18

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Drupalcamp Nantes - Adapter Drupal Drupalcamp Nantes - Adapter Drupal Presentation Transcript

    • Adapter Drupal Florian Lorétan
    • Adapter Drupal
    • Adapter Drupal• Pourquoi?
    • Adapter Drupal• Pourquoi?• La méthode
    • Adapter Drupal• Pourquoi?• La méthode• Exemples
    • Adapter Drupal• Pourquoi?• La méthode• Exemples• Conseils
    • Adapter Drupal Pourquoi?
    • Glue Code
    • mymodule.infoname = "My Module"description = "Example custom module"core = 7.xmymodule.module<?php
    • La méthode
    • La méthode• Quoi et pourquoi?
    • La méthode• Quoi et pourquoi?• Quel composant?
    • La méthode• Quoi et pourquoi?• Quel composant?• Quelles données
    • La méthode• Quoi et pourquoi?• Quel composant?• Quelles données• Comment?
    • Un exemple
    • form
    • api.drupal.org
    • hook_form_alter(&$form, &$form_state, $form_id)
    • function mymodule_form_alter(&$form, &$form_state, $form_id) { dpm(‘youpiiiii!’);}
    • Module “Devel” : http://drupal.org/project/develfunction mymodule_form_alter(&$form, &$form_state, $form_id) { dpm(‘youpiiiii!’);}
    • function mymodule_form_alter(&$form, &$form_state, $form_id) { dpm($form_id);}
    • function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == article_node_form) { dpm($form); }}
    • function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == article_node_form) { $form[actions][submit][#value] = t(Publish this article); }}
    • quelques exemples
    • function mymodule_menu_alter(&$items) { $items[user/register][type] = MENU_CALLBACK; $items[user/password][type] = MENU_CALLBACK;}
    • 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))); }}
    • Attention!• Sécurité• Commentaires• Dépendances• Références• Contribuez!