This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppController extends Controller { | |
public $components = array( | |
'Session' | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "smartsubmit/app", | |
"description": "SmartSubmit Application", | |
"type": "application", | |
"keywords": ["framework"], | |
"homepage": "http://example.com/smartsubmit", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "<destinydriven>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function fetch_timesheet($id = null) { | |
$this->autoRender = false; | |
$this->layout = 'ajax'; | |
if(!$this->request->is('ajax')){ | |
throw new MethodNotAllowedException(__('This method is not allowed within this context!')); | |
} | |
$options = array( | |
'conditions' => array('Timesheet.' . $this->Timesheet->primaryKey => $id), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"@timestamp":"2015-03-28T03:44:06.656451+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":"* Shell output:","@tags":["cli.cakebox"],"@type":"cakephp"} | |
{"@timestamp":"2015-03-28T03:44:06.656693+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":" => Loading composer repositories with package | |
information","@tags":["cli.cakebox"],"@type":"cakephp"} | |
{"@timestamp":"2015-03-28T03:44:06.656818+00:00","@source":"cakebox","@fields":{"channel":"cli.cakebox","level":100,"ctxt_scope":[]},"@message":" => | |
Installing dependencies from lock file","@tags":["cli.cakebox"],"@type":"cakephp"} | |
{"@timestamp":"2015-03-28T03:44:06.656940+00:00","@source":"cakebox","@fields": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Highcharts\Controller\Component; | |
use Cake\Controller\Component; | |
use Ghunti\HighchartsPHP\Highchart; | |
use Ghunti\HighchartsPHP\HighchartJsExpr; | |
class HighchartsComponent extends Component { | |
public function initialize(array $config) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "destinydriven/Highcharts", | |
"description": "Highcharts plugin for CakePHP", | |
"type": "cakephp-plugin", | |
"require": { | |
"php": ">=5.4", | |
"ghunti/highcharts-php": "~3.0" | |
}, | |
"require-dev": { | |
"phpunit/phpunit": "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array( | |
'0.Employee.id' => '517c57ea-c42c-4dec-be83-1ac089661960', | |
'0.Employee.last_name' => 'Alexander', | |
'0.Employee.first_name' => 'Nancy', | |
'0.Employee.nic_number' => '308766', | |
'0.Employee.tax_number' => '632541', | |
'0.Employee.tax_code' => '174', | |
'0.Employee.active' => true, | |
'0.EmploymentData.department_id' => '6', | |
'0.EmploymentData.Department.name' => 'ACCOUNTING & FINANCE', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach($dtResults as $result) { | |
//$this->log($result, LOG_DEBUG); | |
$this->dtResponse['aaData'][] = array( | |
$result['Employee']['id'], | |
$result['Employee']['last_name'], | |
$result['Employee']['first_name'], | |
$result['Employee']['nic_number'], | |
$result['Employee']['tax_number'], | |
$result['Employee']['tax_code'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public $components = array( | |
'Paginator', | |
'RequestHandler', | |
'DataTable.DataTable' => array( | |
'Employee' => array( | |
'columns' => array( | |
'id' => false, // bSearchable and bSortable will be false | |
'last_name' => array('label' => 'Last Name', 'bSearchable' => true, 'bSortable' => true), // bSearchable and bSortable will be true, with a custom label `Name` | |
'first_name' => array('label' => 'First Name', 'bSearchable' => true, 'bSortable' => true,), | |
'nic_number' => array('label' => 'NIC #', 'bSearchable' => true, 'bSortable' => true), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Magic method for verbose flash methods based on element names. | |
* | |
* For example: $this->Flash->success('My message') would use the | |
* success.ctp element under `app/View/Element/Flash` for rendering the | |
* flash message. | |
* | |
* @param string $name Element name to use. | |
* @param array $args Parameters to pass when calling `FlashComponent::set()`. | |
* @return void |
OlderNewer