• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Content Type Name Phrase

xf_phantom

Well-known member
#1
It would be nice if xenforo would provide the contentTypePhraseKey from a central place.

To avoid copy and paste code or some ugly hacking/improvisement , i would have to get the attachment handler (IF IT EXISTS for my content type) and call attachmentHandler->getContentTypePhraseKey just to get the phrasename of a content type. (because this is ATM the only place where it's available in the core)

What about moving it to the content_type or content_type_field table?
Then a simple $model->getContentTypeField('foo', 'phrase_key'); and/or $model->getContentTypesWithField('phrase_key') (= array with all phrasenames) would work:)
 
Last edited by a moderator: