Ralf Eggert wrote > Hi, > > in an entity I have the title column. A value could be: > > This is my "stupid" text with spécial chars!!! > > This entity has an url column. This should take the value from the title > in a converted way like this: > > this-is-my-stupid-text-with-special-chars > > I think you know what I mean. Creating this filter is not the big deal. > I only need to extend Zend\Filter\AbstractFilter or implement > Zend\Filter\FilterInterface. But configuring the usage makes me think. > > I won't use the filter with a form. I want to use it in my service. When > the title column is filled properly then the filter should be used to > set thr url column. > > I could use the service manager to make instances of the filter > available, but this sounds badly. Especially the injection of my filter > to other classes sounds wrong. > > I could simply instantiate my filter in my service, but that sounds too > simple. > > I guess I need to use the plugin manager or something but how? > > Please advise. > > Thanks and best regards, > > Ralf
I think in your case it does make sense to call that custom Filter in your Service class as you've mentioned. I would do it this way. ----- Cheers, -- Luke Mierzwa -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/ZF2-create-custom-filter-tp4657029p4657031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
