title: ZF2 ACL check link in view
body: <p>I have set up my roles, resources and permissions in my bootstrap, and in my layout have set up a navigation menu based on this, and this works.</p>
  
  <p>What I am attempting to do now is create an admin panel with edit / delete links IF the current logged in user has those permissions. e.g. I may have multiple roles that can view a list of cms pages, but only certain roles can edit a cms page, and only certain roles can delete a cms page.</p>
  
  <p>At the moment I am just checking if the user is logged in:</p>
  
  <pre><code>&lt;?php if($user = $this-&gt;identity()): ?&gt;
      &lt;?php if($user['role'] == 'admin'):?&gt;
          &lt;a href="/delete-url"&gt;Delete&lt;/a&gt;
      &lt;?php endif;?&gt;
  &lt;?php endif;?&gt;
  </code></pre>
  
  <p>How do I check the permissions of the current user role for the specified resource from the view for an arbitrary link (as above)?</p>