Kajona\System\Admin\AdminFormgeneratorFactory

Form generator factory which creates AdminFormgenerator instances based on an model. The formgenerator class can be specified by a @formGenerator annotation on the model

Synopsis

class AdminFormgeneratorFactory {
  • // constants
  • const STR_FORMGENERATOR_ANNOTATION = "@formGenerator";
  • // members
  • protected static array $arrForms = ;
}

Constants

Name Value
STR_FORMGENERATOR_ANNOTATION "@formGenerator"

Members

protected

  • $arrForms — array
    Cache for all created form generator objects

Methods

public

  • createByModel() — Returns the fitting form generator for the model. The result is cached so that the a model returns always the same instance
  • getFormForModel() — Returns the form generator from the internal cache or null if not available
  • getKeyByModel() — Returns the cache key for the model
  • hasModel() — Returns whether a form exists in the cache