def perform(self, obj, app_class): app_class._permits.register( methodify(obj, selfname="app"), identity=self.identity, obj=self.model, permission=self.permission, )
def perform(self, obj, app_class, datasource_registry: DataSourceRegistry): def factory(name): return obj app_class.get_datasource_factory.register(reg.methodify(factory), name=self.name) datasource_registry.register(name=self.name, **self.cache_config)
def perform(self, obj, app_class): app_class.get_structure_column.register( reg.methodify(obj), model=self.model, request=morepath.Request, name=self.name, )
def perform(self, obj, app_class, type_registry: TypeRegistry): def factory(name): return obj app_class.get_typeinfo_factory.register(reg.methodify(factory), name=self.name) type_registry.register_type(name=self.name)
def perform(self, obj, app_class, behavior_registry: BehaviorRegistry): def factory(name): return obj app_class.get_behavior_factory.register(reg.methodify(factory), name=self.name) behavior_registry.register_behavior(name=self.name)
def perform(self, obj, app_class, default_factory_registry: DefaultFactoryRegistry): def factory(name): return obj app_class.get_default_factory.register(reg.methodify(factory), name=self.name) default_factory_registry.register(name=self.name)
def perform(self, obj, app_class): def get_provider(model, name): return PortletProvider(obj, self.permission, self.name) app_class.get_contextportletprovider.register( reg.methodify(get_provider), model=self.model, name=self.name, )
def register_path_variables(self, model, func): """Register variables function for a model class. :param model: model class :param func: function that gets a model instance argument and returns a variables dict. """ self.app_class._path_variables.register( methodify(func, selfname='app'), obj=model)
def register_path_variables(self, model, func): """Register variables function for a model class. :param model: model class :param func: function that gets a model instance argument and returns a variables dict. """ self.app_class._path_variables.register(methodify(func, selfname='app'), obj=model)
def perform(self, obj, app_class): app_class.get_breadcrumb.register( reg.methodify(obj), model=self.model, request=morepath.Request, )
def perform(self, obj, app_class): app_class.get_license_key.register( reg.methodify(obj), request=morepath.Request, )
def perform(self, obj, app_class): def factory(name): return obj app_class.get_index_resolver.register(reg.methodify(factory), name=self.name)
def perform(self, obj, app_class): app_class.get_restricted_module.register(reg.methodify(obj), name=self.name)
def perform(self, obj, app_class): app_class._dump_json.register( methodify(obj, selfname='app'), obj=self.model)
def perform(self, obj, app_class): app_class.get_dataprovider.register(reg.methodify(obj), schema=self.schema, obj=self.obj, storage=self.storage)
def perform(self, obj, app_class): app_class._verify_identity.register(methodify(obj, selfname='app'), identity=self.identity)
def perform(self, obj, app_class): app_class._permits.register( methodify(obj, selfname='app'), identity=self.identity, obj=self.model, permission=self.permission)
def perform(self, obj, app_class): app_class.get_static_components = reg.methodify(obj, selfname='app')
def perform(self, obj, app_class): app_class.get_xattrprovider.register(reg.methodify(obj), model=self.model)
def perform(self, obj, app_class): app_class._get_authn_provider.register(reg.methodify(obj))
def perform(self, obj, app_class): app_class.get_identifierfields.register(reg.methodify(obj), schema=self.schema)
def perform(self, obj, app_class): app_class.get_jsonprovider.register(reg.methodify(obj), obj=self.obj)
def perform(self, obj, app_class): app_class.get_copyright_notice.register( reg.methodify(obj), request=morepath.Request, )
def perform(self, obj, app_class): app_class._load_json = methodify(obj, selfname='app')
def perform(self, obj, app_class): app_class.get_formvalidators.register(reg.methodify(obj), schema=self.schema)
def perform(self, obj, app_class): app_class._verify_identity.register( methodify(obj, selfname='app'), identity=self.identity)
def perform(self, obj, app_class): app_class._link_prefix = methodify(obj, selfname='app')
def perform(self, obj, app_class): app_class.get_statemachine.register(reg.methodify(obj), model=self.model)
def perform(self, obj, app_class): app_class.get_messagingprovider.register(reg.methodify(obj), request=morepath.Request, name=self.name)
def perform(self, obj, app_class): app_class._get_blobstorage.register(reg.methodify(obj), model=self.model, request=morepath.Request)
def perform(self, obj, app_class): app_class.get_schemaextender.register(reg.methodify(obj), schema=self.schema)
def perform(self, obj, app_class): app_class.get_vocabulary.register(reg.methodify(obj), request=morepath.Request, name=self.name)
def perform(self, obj, app_class): app_class._dump_json.register(methodify(obj, selfname='app'), obj=self.model)
def perform(self, obj, app_class): app_class.get_indexer.register( reg.methodify(obj), model=self.model, name=self.name, )