Skip to content

Instantly share code, notes, and snippets.

View biesbjerg's full-sized avatar

Kim Biesbjerg biesbjerg

View GitHub Profile
@biesbjerg
biesbjerg / gist:bb28ba80862d57306a0e
Last active April 22, 2016 16:09
Fix for Selectize and FastClick
PLUGIN (save as selectize-fast-click.js and load after selectize.js):
------------------------------------------------------
Selectize.define('fast_click', function(options) {
var self = this;
this.render = (function() {
var original = self.render;
return function(templateName, data) {
var html = original.apply(this, arguments);
var $output = $(html).addClass('needsclick');
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
use Cake\ORM\Query;
use Cake\Validation\Validator;
class UsersTable extends Table
{
/src/Model/Table/UsersTable.php (line 46)
object(Cake\Validation\Validator) {
'_presenceMessages' => [],
'_allowEmptyMessages' => [],
'_useI18n' => true,
'_providers' => [],
'_fields' => []
}
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
use Cake\ORM\Query;
use Cake\Validation\Validator;
class UsersTable extends Table
{
src/Controller/Admin/UsersController.php (line 64)
object(App\Model\Entity\User) {
'role' => '',
'[new]' => true,
'[accessible]' => [
'*' => true
],
'[dirty]' => [
'role' => true
<?php
App::uses('Folder', 'Utility');
App::uses('AppShell', 'Console/Command');
class UpgradeTask extends AppShell {
public function execute() {
$this->out(sprintf('Location: %s', APP));
$this->hr();
$files = $this->_getFiles();