Skip to content

Instantly share code, notes, and snippets.

View netstyler's full-sized avatar
🎯
Focusing

Falk netstyler

🎯
Focusing
View GitHub Profile
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function(config) {
// Define changes to default configuration here.
// For the complete reference:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
<?php
App::uses('AppModel', 'Model');
/**
* OfficeApply Model
*
* @property ProfileCategory $ProfileCategory
* @property Country $Country
*/
class OfficeApply extends AppModel {
<?php
App::uses('AppModel', 'Model');
/**
* OfficeApply Model
*
* @property ProfileCategory $ProfileCategory
* @property Country $Country
*/
class OfficeApply extends AppModel {
<?php
App::uses('AppService', 'Service/v1');
class CommentsService extends AppService {
public $api = true;
public $adaptorClass = 'WaJsend';
/**
@netstyler
netstyler / gist:67b3913425b0100f620d
Created November 19, 2014 13:01
data of saveAll
array(
'Company' => array(
'company' => 'SWA',
'street' => 'not set',
'postal_code' => 'not set',
'city' => 'Sausalito, CA',
'country_id' => '11',
'tel1' => '5106525800',
'email' => 'ron@heckmanncommunications.com',
'url' => 'http://www.swagroup.com',
<?php
/**
* Copyright 2013 - 2014, Cake Development Corporation (http://cakedc.com)
*
* @copyright Copyright 2013 - 2014, Cake Development Corporation (http://cakedc.com)
*/
App::uses('Object', 'Core');
App::uses('Inflector', 'Utility');
App::uses('ClassRegistry', 'Utility');
@netstyler
netstyler / __get
Last active August 29, 2015 14:09
AbstractService __get
/**
* Magic method for lazy loading Models or Components.
*
* @param string $name Name of the Model or Component to get.
* @return mixed
*/
public function __get($name) {
foreach ($this->uses as $model) {
list($plugin, $modelName) = pluginSplit($model);
<?php
App::uses('AppHelper', 'View/Helper');
class WaHelper extends AppHelper {
public $helpers = array('Time');
/**
* Bool
*
@netstyler
netstyler / TagCloudHelper.php
Created October 1, 2014 14:43
changed tag helper
<?php
/**
* Copyright 2009-2014, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2009-2014, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
function prep_url($str = '')
{
if ($str == 'http://' OR $str == '')
{
$_POST[$this->_current_field] = '';
return;
}
//++ @PATCH