Drupal development
Jump to navigation
Jump to search
Basics
- Drupal's basic building blocks - the search for core, Ronald Ashri, Nov 2009
- Drupal programming from an object-oriented perspective
- Drupal dev docs - "Newcomers to Drupal development should read the conceptual information provided in the 'Components of Drupal' section, and then proceed to examine one of the heavily-documented example modules below. The examples are fully-functioning Drupal modules, so you can download them from the contributions repository and alter them as you experiment."
Content architecture
An entity is a kind of content stack. An entity base table is tied to fields using bundles. Entity types include node, comment, taxonomy term, user profile, organic group, etc. Entity types can allow bundling or not (creating types of node node vs. users, though see the Profile 2 module). Fields are used to store and display various data types, and can be reused across bundles and entities.
- http://www.slideshare.net/ronald_istos/drupal-entities-emerging-patterns-of-usage
- http://www.slideshare.net/erikwebb/drupal-7-and-entities-7036807
hook_entity_info - "Inform the base system and the Field API about one or more entity types."
- http://www.trellon.com/content/blog/creating-own-entities-entity-api
- http://www.slideshare.net/ronald_istos/how-to-make-entities-and-influence-drupal-emerging-patterns-from-drupal-contrib
- http://bxl2011.drupaldays.org/node/313 - fago
Modules
- http://drupal.org/project/coder - use when writing modules
Forms
For beyond basic content types field layouts;
- http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7 - programmer's reference to the Drupal Form API
function milk_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'contact_node_form') { $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Send'), ); } }
Menus
JavaScript
<?php drupal_add_js(drupal_get_path('theme', 'mytheme') .'/my_js_file.js', 'theme'); ?>
- Drupal 7 JavaScript for Developers - good video