User login

OOP

Stumbling through DBTNG, Drupal 7's new database layer

Order matters. condition() before countQuery()

This fails (note it trying to do a subquery):

<?php
return db_select('block')->countQuery()->condition('theme', $theme)->execute()->fetchField();
?>

DrupalConDC Patterns and Object Orientation in Drupal Code

Drupal patterns

hook_menu, hook_theme, hook_views_data

In a sense, hook_menu and hook_form are declaritive programming.

Action hooks

hook_nodeapi, hook_user
See: passive observer
Use: Event-driven programming

Visitor hooks

hook_form_alter, hook_nodeapi, hook_user
Passive observer, Visitor
Use: Non-inheritance modification

Gets around the fact inheritance is one way.

Object "hook"

sort-of, kind of a way of doing inheritance. Couldn't figure out what this

Syndicate content