public function getService(LifecycleEventArgs $args)
    {
        $service = $args->getObject();

        if (!$service) {
            throw new \Exception('Please set a provider on the entity before persisting any media');
        }

        return $this->getBlockManager()->getService($service);
    }
public function getService(LifecycleEventArgs $args)
    {
        $service = $args->getObject();

        if (!$service) {
            throw new \Exception('Please set a provider on the entity before persisting any media');
        }

        return $this->getBlockManager()->getService($service);
    }
public function getService ( LifecycleEventArgs $ args ) { $ service = $ args -> getObject ( ) ; if ( ! $ service ) { throw new \ Exception ( 'Please set a provider on the entity before persisting any media' ) ; } return $ this -> getBlockManager ( ) -> getService ( $ service ) ; }
Get the service

@param LifecycleEventArgs $args
@return \Opifer\ContentBundle\Block\BlockServiceInterface
@throws \Exception
Get the service