Skip to content

Instantly share code, notes, and snippets.

View mkorostoff's full-sized avatar

Jersey Len mkorostoff

View GitHub Profile
<?php
/**
* Implements hook_views_api_alter().
* Enables using templates inside module
*/
function yourmodule_views_api_alter(&$list) {
$list['yourmodule']['template path'] = drupal_get_path('module', 'yourmodule').'/templates';
}
<?php
/**
* The language code used when no language is explicitly assigned.
*
* Defined by ISO639-2 for "Undetermined".
*/
define('LANGUAGE_NONE', 'und');
/**
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'mpower',
'username' => 'matt',
'password' => '',
<?php
//settings for use in the l() function to make links open in new tab
$open_in_new_tab = array(
'attributes' => array(
'target' => '_blank'
)
);
//Create a link to the user login page
return l('Log in', 'user/login', $open_in_new_tab);
<?php
return l( 'Log in', 'user/login', array( 'attributes' => array( 'target' => '_blank' ) ) );
<?php
return l('Log in', 'user/login', array('attributes' => array('target' => '_blank')));
{
"user_programs": [
{
"uri": "http://radius.localhost/api/v1/content/25",
"id": "25",
"resource": "node",
"title": "Ex Nostrud Vereor"
},
{
"uri": "http://radius.localhost/api/v1/content/60",
{
"anatomical_regions": [
{
"uri": "http://radius.localhost/api/v1/category/2",
"id": "2",
"resource": "taxonomy_term",
"name": "Abs/Core"
},
{
"uri": "http://radius.localhost/api/v1/category/2",
[
{
"payment_plan": "monthly",
"pid": "3",
"label": "Payment Plan",
"created": "1406904733",
"changed": "1406908135",
"url": "http://radius.localhost/user/78#profile-payment_plan",
"user": {
"uri": "http://radius.localhost/api/v1/entity_user/78",
{
"anatomical_regions": [
{
"uri": "http://radius.localhost/api/v1/entity_taxonomy_term/4",
"id": "4",
"resource": "taxonomy_term",
"name": "Butt"
}
],
"goals": [