Ferreteria/v0.5/registry/feature

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | registry
Revision as of 16:37, 8 March 2022 by htyp>Woozle
Jump to navigation Jump to search

Feature registration

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

class csSetup {
    static public function OnSetup() {
        $oReg = FD\caFeature::FeatureClassRegistry();
        
          $oReg->AddFeature(FU\account\cFeature::class);
          $oReg->AddFeature(FU\client\cFeature::class);
          $oReg->AddFeature(FU\perm\cFeature::class);
          $oReg->AddFeature(FU\session\cFeature::class);
          
          $oReg->AddFeature(FDN\cFeature::class);
    }
}

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