Welcome to the Cookbook

loading...

6.1.2 node()

There is no translation yet for this section. Please help out and translate this.. More information about translations

The AclBehavior also allows you to retrieve the Acl node associated with a model record. After setting $model->id. You can use $model->node() to retrieve the associated Acl node.

You can also retrieve the Acl Node for any row, by passing in a data array.

	$this->User->id = 1;
	$node = $this->User->node();
	
	$user = array('User' => array(
		'id' => 1
	));
	$node = $this->User->node($user);
  1. $this->User->id = 1;
  2. $node = $this->User->node();
  3. $user = array('User' => array(
  4. 'id' => 1
  5. ));
  6. $node = $this->User->node($user);

Will both return the same Acl Node information.