From Woozle Writes Code
Jump to navigation Jump to search

Feature registration

The Feature Registry exists so that default Feature classes can be replaced (upgraded or modified) with classes provided by Dropins. The most common example of this is where Systems designed to work headlessly -- such as the login system -- can be upgraded with a graphical interface by a Dropin.

Feature registration for non-Dropin classes from config/portable/features.php:

use ferret\login as FL;
class csFeatureSetup {
    static public function OnSetup() {
        $oReg = data\caFeature::FeatureClassRegistry();
          // user-login Features

          // node-data

For an example of how code can read the Feature Registry, see cDropinLink::InvokeFeature().