Skip to content

Instantly share code, notes, and snippets.

@dilab
Last active August 30, 2016 08:43
Show Gist options
  • Save dilab/5c7a1815c121045981e9c916d3c1d7b2 to your computer and use it in GitHub Desktop.
Save dilab/5c7a1815c121045981e9c916d3c1d7b2 to your computer and use it in GitHub Desktop.
<?php
namespace App\Controller;
use Cake\Event\Event;
use Cake\ORM\TableRegistry;
use Cake\Utility\Hash;
class RegistrationController extends AppController
{
public function beforeFilter(Event $event)
{
parent::beforeFilter($event);
$this->Auth->allow(['index']);
}
public function test()
{
$entry = TableRegistry::get('EventCategoryParticipantEntries')->newEntity();
$entry->errors('emy_contact_no.code', 'test');
$this->set(compact('entry'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment