nystudio107 / generator-craftplugin

generator-craftplugin is a Yeoman generator for Craft CMS plugins
MIT License
74 stars 30 forks source link

BUG: Capitalization issue in Services example #11

Closed lindseydiloreto closed 8 years ago

lindseydiloreto commented 8 years ago

http://craftcms.stackexchange.com/questions/15206/how-do-i-call-a-service-from-my-controller-in-a-plugin

khalwat commented 8 years ago

Fixed. This was actually semi-annoying to fix.

class LukeLuckLikesLakes_SomeThingService extends BaseApplicationComponent
{
    /**
     * This function can literally be anything you want, and you can have as many service functions as you want
     *
     * From any other plugin file, call it like this:
     *
     *     craft()->lukeLuckLikesLakes_someThing->exampleService()
     */
    public function exampleService()
    {
    }

}
lindseydiloreto commented 8 years ago

Yikes. Thanks for getting that sorted out!