Closed (fixed)
Project:
Mentions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2015 at 14:36 UTC
Updated:
25 Oct 2015 at 22:14 UTC
Jump to comment: Most recent
What is the purpose of the CTools requirement exactly? This seems like overkill to me, surely it's not needed.
Comments
Comment #2
decipheredCTools is a requirement as it's a requirement of Entity Reference, which is a requirement of the Entity Mention type plugin.
The Entity Mention type plugin adds a Entity Reference field to the Mention entity for the sake of storing the mentioned entity as a Entity reference that can be used to create a relationship in Views, or any other purpose.
Ideally the dependency on Entity Reference would be removed in the future, but without it there would be no Mention Types currently available and as such the module wouldn't be usable out of the box.
While I could use a custom property or custom field and a custom views handler to get the same functionality, I'd prefer not to re-invent the wheel, and given that CTools is a requirement of Views I don't see it being an issue for the majority of users.
Comment #3
markhalliwellThe
entity_typeentity seems a bit overkill IMO. All thementionentity needs are customentity_type,entity_idandentity_bundleproperties, which are really the crux of any kind of entity referencing. We don't really need the entity_reference module to do that and it just adds yet another level of complexity out of the box.For the views/ctools UI stuff, that should really go in a separate
mentions_uisub-module as we had originally discussed (which is where this ctools dependency/plugin can be added).Comment #4
decipheredThat's on the assumption that a mention is from and too an entity. It occurs to me that a mention does not have to be to/from an entity, especially given one of the use-cases you personally made for the module; Mentioning an API function/page.
There is not CTools UI stuff in the 7.x-2.x branch, it is now completely Entity API based, and there are no default Views at this stage, just Views integration provided by the Entity API module and improved via a hook_views_data_alter() function. Views is not a requirement.
I'm open to removing the dependency on Entity Reference (and as such, CTools), and there is already a @TODO to that extent, but it would have to be done in such a way that getting the Entity relationship in the View is easy, as IMO it is most likely going to be one of the most commonly used features.
Comment #5
decipheredRegarding the CTools requirement; more correct than my previous response, Mentions Types plugins are CTools plugins, so the dependency is essential. I have removed the dependency on Entity Reference, rather opting to provide a textual warning if it's not available as it will reduce the functionality of the Entity Mention type.
There is no Mentions UI specific stuff, as that as all provided by the Entity module which is a requirement for backend functionality.