public function nodeExists()
{
if (!isset($this->args[0]) || !isset($this->args[1])) {
return false;
}
$dataVars = $this->_dataVars($this->args[0]);
extract($dataVars);
$key = is_numeric($this->args[1]) ? $dataVars['secondary_id'] : 'alias';
$conditions = [$class . '.' . $key => $this->args[1]];
$possibility = $this->Acl->{$class}->find('all', compact('conditions'));
if (empty($possibility)) {
$this->error(__d('cake_acl', '{0} not found', [$this->args[1]]), __d('cake_acl', 'No tree returned.'));
}
return $possibility;
}