DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Initializing the service¶
Every service must have an init()
method which tells TYPO3 CMS whether the
service is available or not. This is where you should test the
connection to whatever remote application you are connecting to. If
that test connection fails, the init()
method should return false.
Otherwise it should return true.
If your connector has no risk of failing (for example, because it
operates locally and is not dependent on anything special), you must
still implement the init()
method and have it return true all the
time.
The init()
method of the base connector class
(\Cobweb\Svconnector\Service\ConnectorBase
) performs some initializations,
in particular creating an instance of the \TYPO3\CMS\Core\Log\Logger
class.
So in your own service you should always call the parent method.