I have a large section of code in beforeSave that needs to be called several times and I would like to make it a function.
I have tried very simple functions(as below) but seem unable to call a function at all???
ex:
<?php
namespace Espo\Custom\Hooks\Task;
use Espo\ORM\Entity;
class Task extends \Espo\Core\Hooks\Base
{
public function beforeSave(Entity $entity, array $options = array())
{
abc();
}
public function abc()
{
d$='test';
}
}
Many thanks!
Scott
I have tried very simple functions(as below) but seem unable to call a function at all???
ex:
<?php
namespace Espo\Custom\Hooks\Task;
use Espo\ORM\Entity;
class Task extends \Espo\Core\Hooks\Base
{
public function beforeSave(Entity $entity, array $options = array())
{
abc();
}
public function abc()
{
d$='test';
}
}
Many thanks!
Scott
Comment