[uml] EntityFilter

Webel module:


UML element type:

OOE stereotypes:

uses [Usage] : 
Relationships (inverse)

A good example of how encapsulating related functions as static helper/builder class methods (that can be reverse engineered to UML) brings immediate advantage to both the code organisation and the UML diagramming, without even considering in detail yet how this might be handled as an object.

UML Diagram
Click on the UML diagram to view it in a lightbox image viewer. You may then zoom in (or just open the image in a new web browser tab using the Download Original link to view large diagrams).

UML modelling domain:


Need to encapsulate string used for '<All>' mode as constant, and consistently relate to STATE_VAR_FILTER_ENTITYTYPE_ALL.

  static protected function buildOptionsEntityTypes() {
    $entity_info = entity_get_info();
    $options = array();
    // To choose all.
    $options['0'] = '<All>';

This helper/builder class can create both a non-AJAX and an AJAX-aware entity type filter form element, as well as offering some helper functions for the actual filtering against entity type.

Notes (policies)
Visit also