Skip to content

Instantly share code, notes, and snippets.

View jakelacey2012's full-sized avatar
🐭
Happy Days

Jake Lacey jakelacey2012

🐭
Happy Days
View GitHub Profile
<?php
/**
* Implements hook_schema().
*/
function JwLanalytics_schema() {
$schema = array();
// this has been moveed to the communications manager
$schema['users_logins_data'] = array(
'description' => 'This is where we hold the users login data',
'fields' => array(
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use App\Task;
class TaskTest extends TestCase
{
@jakelacey2012
jakelacey2012 / decouple.debug.php
Last active May 24, 2016 08:08
Decouple DEBUGGING!
<?php
/**
* updateds nodes helper debug function this is where all our debug code can go
* @param [array] $debug Avaliable debug information pass more for more to become
* @param [boolean] $die This will break on the first interation
* @param [array] $array An array containing all of the values that have been
* passed in one build.
* avaliable.!
*/
@jakelacey2012
jakelacey2012 / drupal-addnodeform.php
Last active April 28, 2016 07:56
(Drupal) Node Add Form Programatically
<?php
/**
* This will fetch and display our node form of a chosen content type.
* @param $type [String] : this is the content type.
* @return $form [array] : form containing elements
*/
function get_node_form($type) {
module_load_include('inc', 'node', 'node.pages');
$form = node_add($type);