# Connector Classes and Actions

**URL:** <https://meta.discourse.org/t/connector-classes-and-actions/54813>\
**Category:** Development\
**Created:** [2016 年 12 月 27 日午前 5:24 UTC](https://meta.discourse.org/t/connector-classes-and-actions/54813 "2016-12-27T05:24:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![skoota](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skoota/32/65472_2.png) [@skoota](https://meta.discourse.org/u/skoota)\
**Post date:** [2016 年 12 月 27 日午後 8:35 UTC](https://meta.discourse.org/t/connector-classes-and-actions/54813/3 "2016-12-27T20:35:47Z")

</div>

Thanks for the info @eviltrout . I am still a bit confused about how to be passing around the custom field data. When I was experimenting last night I created a `plugin.js` file in an `initalizers` directory and reopened the `ComposerController` so that I could override the `save` method, which works as that is now called whenever a post is saved.

So, right now the general plugin initalizer file just has the `ComposerController` code and the connector class (specific for the outlet) contains `setupComponent` which gets a reference to the model (via `args.model`) and sets up the control being inserted at the outlet. Is this workflow right? Or should I be doing all this in the connector class (which didn’t work on my first attempt, see above question)?

The immediate problem I am encountering is how to access the custom field data from the initalizer class, so that it can be used in the overriden `save` method on the `ComposerController`. Any ideas on how to approach this?

I imagine this issue will also exist if the event listener is implemented in the initializer class too.

I have looked through the sample code for many other plugins, but since the connector class pattern is so new I can’t really find anything that helps.

---

_[View the full topic](https://meta.discourse.org/t/connector-classes-and-actions/54813)._
