1. 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

Discussion in 'Closed Suggestions' started by xf_phantom, Aug 17, 2013.

  1. xf_phantom

    xf_phantom Well-Known Member

    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: Mar 25, 2014
    Bob likes this.

Share This Page