Skip to content

Instantly share code, notes, and snippets.

View amitaibu's full-sized avatar

Amitai Burstein amitaibu

View GitHub Profile
php_value max_execution_time 600
<?php
/**
* Implements hook_field_widget_info().
*/
function term_reference_tree_field_widget_info() {
return array(
'term_reference_tree' => array(
'label' => t('Term reference tree'),
'field types' => array('taxonomy_term_reference', 'entityreference'),
$project_node = node_load(12);
$message = message_create('upcoming_meeting');
$message_wrapper = entity_metadata_wrapper('message', $message);
$message_wrapper->field_meeting->set(2);
$message_wrapper->field_project->set(12);
return message_subscribe_send_message('node', $project_node, $message);
- [ ] Single Events that span a large amount of time should only be shown if they have started < 30 minutes ago
$result = array(
'id' => 1,
'label' => 'Capacity building in support of the African Forum for Utility Regulators',
'action' => 18827,
'amount' => 1299396,
'year' => 2009,
'residual' => FALSE,
'activity' => array(
'list' => array( 100, 150, 350),
'self' => 'http://example.com/api/v1/activity',
public function viewEntity($entity_id, $request, stdClass $account) {
if (!empty($request['html'])) {
}
return parent::viewEntity();
{
"require": {
"symfony/yaml": "v2.5"
}
}
<?php
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Credentials: true");
header('Access-Control-Allow-Headers: Authorization, X-Restful-Minor-Version, X-Csrf-Token, X-Access-Token, accept, content-type');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PATCH, PUT');
<!DOCTYPE html>
<html>
<head>
<title>Taglit</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>