CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Approaches to Managing Access to Content via Relationship
Pages: 1 [2]

Author Topic: Approaches to Managing Access to Content via Relationship  (Read 3140 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Approaches to Managing Access to Content via Relationship
January 13, 2013, 01:15:54 pm
I'm never patient enough to watch screen casts.

The piece currently missing is that although it's possible to link a node to a civicrm entity using an 'entity_reference' field the details of the entity are visible in edit mode but not display mode. I suspect it might be to do with the bundle configuration which I haven't fully got clear about how it should look
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Approaches to Managing Access to Content via Relationship
January 16, 2013, 09:25:40 pm
Was wondering if this may be a simpler approach: user drupal services (http://drupal.org/project/services).  I also found these that may be helpful:
http://drupal.org/project/entity_extras
http://drupal.org/project/eck - seems well documented.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Approaches to Managing Access to Content via Relationship
January 16, 2013, 10:50:33 pm
I think the second 2 are extensions of the entity approach whereas the first is a completely different approach?

I now have entitiy reference fields working - in the context where you can add a entity reference field that references a civicrm event to a node. Not sure this has any hugely obvious use I can point out but I think it might allow you to add an event view to a node. (I'm using it in the context of an organic group for the  participants in an event to have a private posting space)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Approaches to Managing Access to Content via Relationship
January 17, 2013, 05:14:42 am
yes, they do sound like completely different approaches.  I think, generally, the nice thing about exposing the civicrm entities as drupal entities is the general ability to use them throughout drupal. Chaos tools (panels, display suite, rules, webform, commerce, views, etc.)  I realize there are many approaches to this integration, and I'm not a programmer, so I may be really off base, but these approaches (services or directly via entity API) seem like a generalized and extensible approach.  I don't have an immediate need / use case for this but many have come up in the past that forced workarounds and I've seen many requests for various types of entity integration in the civi community. It sounds like you also have a very specific use case  but thoguth this might be a good place to float the references .

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Approaches to Managing Access to Content via Relationship
January 17, 2013, 12:18:46 pm
Just to clarify - the approach I am using is dependent on the entity_api module and exposes civicrm entities as drupal entities  - that can be extended by things like Rules, Views, Entity Reference fields & I expect the entity extras & eck (which I think is about field extensions). I suspect making entities 'fieldable' would open up some useful possibilities
« Last Edit: January 17, 2013, 01:22:42 pm by Eileen »
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Approaches to Managing Access to Content via Relationship
January 23, 2013, 12:04:16 am
Update - I have just tried creating a view based off a node with an 'entity reference' field (to an event) using civicrm_entity & it does work. You have to add in the relationship in the views UI
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Approaches to Managing Access to Content via Relationship
February 07, 2013, 10:25:36 am
Wonderful. This would also allow panels and display suite to use civi entities which should make it much easier to integrate without coding. Excellent contribution!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Approaches to Managing Access to Content via Relationship
February 07, 2013, 11:30:10 am
Yes - give it a go & see whether it does expose stuff

 https://github.com/eileenmcnaughton/civicrm_entity/

I think it will run against a 'bare' 4.2 - but have coded it against our 4.2 which includes a bunch of 4.3 backports
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Approaches to Managing Access to Content via Relationship

This forum was archived on 2017-11-26.