How to create a service instance from a static function ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • tothewine
    replied
    There is no way to get a ServiceFactory from $GLOBALS['app'] ?

    Leave a comment:


  • yuri
    replied
    Not possible. There is no any global variable in espocrm.

    Leave a comment:


  • How to create a service instance from a static function ?

    I want to do this in a static function. Is there any way to get a reference from the global $app variable for example ?
    PHP Code:
      $activityService $this->getServiceFactory()->create('Activities'); 
Working...