I have an entity like the below:

```
class item
{
/**
 * @var integer
 *
 * @ORM\Column(name="id", type="integer")
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="AUTO")
 */
private $id;

/**
 * @ORM\Column(type="integer",nullable=true)
 */

private $errorNum;

public function getErrorNum()
{
    return $this->errorNUm * 3;

}

```

I can access the `$errorNum` property in Twig like this after passing the entity to Twig:

```
{{ item.errorNum }}

```

However I want to access the `getErrorNum()` method from Twig.

How can I do it?