title: How to call php function from twig _Symfony3
body: <p>I want to call the function of from the controller in twig.How can i do it</p>
  
  <p>It is my controller</p>
  
  <pre><code>class ArticleController extends Controller
  {
     /**
      * @Route("Article")
      */
     public function indexAction()
     {
         ....................... 
         return $this-&gt;render('MainBundle:Article:index.html.twig', array(
                 'lastArticleCategoryData' =&gt; $lastArticleCategoryData
              ));
     }
     public function datajalali()
     {
         $articles = "sss";
         $v = new Verta(); //1396-02-02 15:32:08
         $v = Verta::now();
  
         return $v;
     }
  }
  </code></pre>
  
  <p>My twig</p>
  
  <pre><code>{% if Article.datajalali %}
     {{ datajalali }}
  {% endif %}
  </code></pre>