rogermaciel/cakephp-acl-link-helper

CakePHP 3.x ACL Link Helper.

1.0 2019-11-27 14:43 UTC

This package is auto-updated.

Last update: 2024-04-28 00:53:26 UTC


README

Loading the helper

in src/View/AppView.php

<?php
	class AppView extends View
	{
		public function initialize()
		{
			$this->loadHelper('Acl', [
				'userModel' => 'Users' //Optional
			]);
		}
	}
?>

Usage

Create normal link

<?= $this->Acl->link($title, $url, $options)); ?>

Create post link

<?= $this->Acl->postLink($title, $url, $options)); ?>