| 1 |
BUGGY CONCEPT CODE!
|
| 2 |
|
| 3 |
This is concept code for a object oriented Forms and Rendering API in Drupal.
|
| 4 |
|
| 5 |
The basic class tree:
|
| 6 |
|
| 7 |
abstract class DrupalObject:
|
| 8 |
A simple callback mechanism for inter-object communication (aka Observer pattern or Signals and Slots)
|
| 9 |
|
| 10 |
abstract class DrupalElement extends DrupalObject:
|
| 11 |
A not-so-simple class. Implements ArrayAcess to access child elements by treating the object as an array.
|
| 12 |
Several children managment features. Implements Iterator to manipulate over what foreach iterates.
|
| 13 |
And more. See the docs.
|
| 14 |
|
| 15 |
abstract class DrupalWidget extends DrupalElement:
|
| 16 |
Adds rendering (theming) functionality to a DrupalElement
|
| 17 |
|
| 18 |
abstract class DrupalForm extends DrupalWidget:
|
| 19 |
FAPI ;)
|
| 20 |
|
| 21 |
abstract class DrupalFormWidget extends DrupalWidget
|
| 22 |
Individual input-widgets like Textfield etc. extend that class.
|