As a beginner in development with EspoCRM, it's really not easy. I still spend most of my time (even after more than a week) trying to find the right classes.
The examples from the forum are outdated and the examples from the documentation are so basic that they (mostly, if they are not also outdated) just work.
As an example hooks:
If I want to get to the EntityManager in a hook, I can find two examples here in the forum from users with over 1k posts.
$this->entityManager;
and
$this->getEntityManager();
If I apply the code that has been posted here on the forum for the last 2 years, none of it works. Also, how can the code work if I don't load the entityManager anywhere in my class...?
So I keep searching and at some point I find \Espo\Core\Hooks\Base.
When I open the class, my editor jumps out at me and calls "deprecated".
So the searcher continues...
Yes, I can make up a workaround. I go into the entity class that the hook should process and create a function getEntityManager(). But that can't be the solution. Unfortunately, this is how it goes with every area I want to program in EspoCRM.
I can't remember the last time I had such problems getting through a source code when there was a forum and documentation for it. It really demotivates enormously when you invest so much time and you are so unproductive.
If EspoCRM wasn't the best I know in terms of functions, I would probably have given up already. But EspoCRM is really a small masterpiece. Which is more than I can say about the documentation.
The examples from the forum are outdated and the examples from the documentation are so basic that they (mostly, if they are not also outdated) just work.
As an example hooks:
If I want to get to the EntityManager in a hook, I can find two examples here in the forum from users with over 1k posts.
$this->entityManager;
and
$this->getEntityManager();
If I apply the code that has been posted here on the forum for the last 2 years, none of it works. Also, how can the code work if I don't load the entityManager anywhere in my class...?
So I keep searching and at some point I find \Espo\Core\Hooks\Base.
When I open the class, my editor jumps out at me and calls "deprecated".
So the searcher continues...
Yes, I can make up a workaround. I go into the entity class that the hook should process and create a function getEntityManager(). But that can't be the solution. Unfortunately, this is how it goes with every area I want to program in EspoCRM.
I can't remember the last time I had such problems getting through a source code when there was a forum and documentation for it. It really demotivates enormously when you invest so much time and you are so unproductive.
If EspoCRM wasn't the best I know in terms of functions, I would probably have given up already. But EspoCRM is really a small masterpiece. Which is more than I can say about the documentation.
Comment