This file contains hidden or 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 | |
// Enforce all rows are converted to an array when needed. | |
$rows = json_decode(json_encode($endpoints), TRUE); |
This file contains hidden or 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
dependencies[] = ctools | |
; Views Handlers | |
files[] = views/mymodule_handler_handlername.inc |
This file contains hidden or 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 | |
/** | |
* Implements hook_views_api_alter(). | |
* Alter the list of modules/themes which implement a views api. | |
*/ | |
function MODULE_views_api_alter(&$list) { | |
// Alter the path of the views implementation. | |
if (isset($list['MODULE'])) { | |
$path = drupal_get_path('module', 'MODULE'); | |
$list['MODULE']['path'] = $path; |
This file contains hidden or 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
xdebug.max_nesting_level=256 | |
xdebug.remote_enable=1 | |
xdebug.remote_host=localhost | |
xdebug.remote_port=9000 | |
xdebug.remote_autostart=1 | |
;xdebug.profiler_enable=0 | |
;xdebug.profiler_output_dir="/Applications/MAMP/tmp" | |
zend_extension="/Applications/MAMP/bin/php/php5.5.17/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so" |
This file contains hidden or 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 | |
/* | |
* Implements hook_node_update(). | |
*/ | |
function openedu_school_node_update($node) { | |
if ($node->type == 'school' && isset($node->field_school_category['und'][0]['tid'])) { | |
$term = taxonomy_term_load($node->field_school_category['und'][0]['tid']); | |
$term->name = $node->title; //change existed taxonomy term | |
taxonomy_term_save($term); |
This file contains hidden or 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
/** | |
* Implements hook_inline_entity_form_table_fields_alter(). | |
*/ | |
function MODULE_inline_entity_form_table_fields_alter(&$fields, $context) { | |
if ($context['parent_bundle'] === 'MODULE' && | |
$context['entity_type'] === 'MODULE_text_asset') { | |
// Remove Title. | |
unset($fields['id']); |
This file contains hidden or 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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Plugin Class Demo | |
* Description: How I am using the base class in plugins. | |
* Plugin URI: | |
* Version: 2012.09.29 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* License: GPL | |
* Text Domain: plugin_unique_name |
This file contains hidden or 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
# Taxonomy terms: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php | |
# Menu links: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php | |
# File items: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php | |
# Nodes: |
OlderNewer