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
$view = new view(); | |
$view->name = 'testing'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'search_api_index_author_expert_index'; | |
$view->human_name = 'testing'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
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 | |
try { | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
// Load Up Magento Core | |
define('MAGENTO', realpath('/path/to/magento')); | |
require_once(MAGENTO . '/app/Mage.php'); |
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
/** | |
* Implement hook_gateway_info | |
*/ | |
function sms_fowiz_gateway_info() { | |
return array( | |
'sms_fowiz' => array( | |
'name' => 'FOWiz Gateway', | |
'send' => 'sms_fowiz_send', | |
'recieve' => TRUE, | |
'configure form' => 'sms_fowiz_settings', |
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
# | |
# This Replaces the old Drupal 7's module .info | |
# | |
name: Todo: Make Drupal 8 Fun | |
type: module # Either module or theme | |
description: Creates our custom TODO module | |
core: 8.x | |
package: TODO | |
configure: entity.todo.settings # This replaces the old admin path from Drupal 7 | |
tags: # Tags can be used as a categorization method for your modules. |
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
<a href="/notes/nojs/create">Create Note</a> |
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 handleAutocomplete(Request $request, $target_type, $selection_handler, $selection_settings_key) { | |
$matches = array(); | |
// Get the typed string from the URL, if it exists. | |
if ($input = $request->query->get('q')) { | |
$typed_string = Tags::explode($input); | |
$typed_string = Unicode::strtolower(array_pop($typed_string)); | |
// Selection settings are passed in as a hashed key of a serialized array | |
// stored in the key/value store. | |
$selection_settings = $this->keyValue->get($selection_settings_key, FALSE); |
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
$form['username'] = array( | |
'#type' => 'textfield', | |
'#title' => t('Username'), | |
'#ajax' => [ | |
'callback' => '::validateEmailAjax', | |
'event' => 'change', | |
], | |
'#suffix' => '<span class="username-available"></span>' | |
); |
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
(function($, Drupal) { | |
/** | |
* Add new command for reading a event. | |
*/ | |
Drupal.AjaxCommands.prototype.getEvents = function(ajax, response, status){ | |
// Place content in current-msg div. | |
$('#event-msg h2').html(response.subject); | |
$('#event-msg p').html(response.content); | |
// Remove from unread list. | |
$('#event-' + response.mid).remove(); |
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 | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildForm ($form, $formState) { | |
// First define our fieldset, and add a #theme tag to our element. | |
// See http://www.drupalcontrib.org/api/drupal/drupal!core!includes!form.inc/function/theme_fieldset/8 | |
// for the default implementation. |
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
interface Achievement { | |
int id; // Public id of this perticular achievement. used to load text. | |
string label; // This will be loaded and populated from the json file. | |
bool displayed; // Has been displayed to the user. | |
bool unlocked; // Has been unlocked by the user. | |
List<AchievementCondition> conditions[]; // A list of conditions that are required to unlock the Achievement. | |
void checkAcievementState(); | |
} |