Announcement

Collapse
No announcement yet.

injectableFactory->create() is not affected by custom binding

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

  • injectableFactory->create() is not affected by custom binding

    Hi there!

    I have a problem. I have created custom binding. But it has no affect. I am trying to bind custom ApplierClassNameListProvider. For example in Espo\Core\Record\Service.php there is a function
    PHP Code:
    private function createSelectApplierClassNameListProvider(): ApplierClassNameListProvider
    {
        return 
    $this->injectableFactory->create(ApplierClassNameListProvider::class);
    }
    ​ 
    And it instantiates ApplierClassNameListProvider directly

  • #2
    Hi,

    You can't override what is created using create method. It's not supposed to be possible to override anything.
    Last edited by yuri; 03-21-2024, 02:37 PM.

    Comment


    • #3
      So there is now way to apply selectApplierClassNameList globally?

      Comment


      • #4
        No. Though you can add it for new custom entities using entity manager hooks. https://docs.espocrm.com/development...ntity-manager/

        Comment

        Working...
        X