So I have a plugin with a service. Part of the service function is to grab a field (body) from an entry object that has been passed into the function.
<?php
namespace Craft;
class MyPlugin_ExampleService extends BaseApplicationComponent {
public function example($entry) {
return $entry->body;
}
}
The function will be called via Twig.
{{ craft.myPlugin.example(entry) }}
How do I go about getting the field data for the users current locale?