src/Factory/TimeElementFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var $serviceLocator FormElementManager */
        $parentLocator = $serviceLocator->getServiceLocator();
        $config        = $parentLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()];

        $formElement = new Time();
        $formElement->setFormat($config['time_format']);
        $formElement->setAttribute('placeholder', $config['time_placeholder']);

        return $formElement;
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var $serviceLocator FormElementManager */
        $parentLocator = $serviceLocator->getServiceLocator();
        $config        = $parentLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()];

        $formElement = new Time();
        $formElement->setFormat($config['time_format']);
        $formElement->setAttribute('placeholder', $config['time_placeholder']);

        return $formElement;
    }
Create service

@param  ServiceLocatorInterface $serviceLocator
@return Time