Announcement

Collapse
No announcement yet.

How to create a service instance from a static function ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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'); 

  • #2
    Not possible. There is no any global variable in espocrm.

    Comment


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

      Comment

      Working...
      X