Answers.Body: <p>Something like this should work:</p>
  
  <pre><code>`craft()-&gt;runController('pluginHandle/controllerId/action');`
  </code></pre>
  
  <p>Although I'd question the decisions you've made to get to the point where you had to ask this question. ;)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-24T12:31:48.807Z
Answers.Text: Thanks. I haven't needed to do this yet and yes of course I want to avoid it. What I'm thinking is if I have a controller that does a **thing**, and I have zero time to refactor that process into a service, then I might as well just call the controller.
Answers.UserDisplayName: Matt V
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-24T02:19:41.797Z
Answers.LastActivityDate: 2015-03-24T02:19:41.797Z
Answers.UserDisplayName: Brad Bell
Body: <p>Is it possible to call a method of a plugin's controller from within a plugin? I don't plan on making a habit of this but sometimes it may be needed. Just trying to plan ahead. </p>
  
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-24T06:14:35.053Z
Comments.Text: Wouldn't it make more sense to just off-load that logic into a service, and simply make the service accessible instead?
Comments.UserDisplayName: Lindsey D
Tags: <plugin-development><controller>
Title: Call Controller Method with Plugin
ThreadText: # Call Controller Method with Plugin
  
  (Asked by: username_0 on 2015-03-24)
  
  Is it possible to call a method of a plugin's controller from within a plugin? I don't plan on making a habit of this but sometimes it may be needed. Just trying to plan ahead.
  
  Thanks!
  
  **Tags:** plugin-development, controller
  
  > **Comments:**
  > **username_1**: Wouldn't it make more sense to just off-load that logic into a service, and simply make the service accessible instead?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-03-24. Score: 4
  
  Something like this should work:
  
  ```
  `craft()->runController('pluginHandle/controllerId/action');`
  
  ```
  
  Although I'd question the decisions you've made to get to the point where you had to ask this question. ;)
  
  > **Comments:**
  > **username_0**: Thanks. I haven't needed to do this yet and yes of course I want to avoid it. What I'm thinking is if I have a controller that does a **thing**, and I have zero time to refactor that process into a service, then I might as well just call the controller.  
  
  ---
  
  