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
| pagseguro_library_load(); | |
| $PagSeguroAPI = new PagSeguroAPI(); | |
| $payment_request = $PagSeguroAPI->createPaymentRequestObject(); | |
| $payment_request->setCurrency("BRL"); | |
| $payment_request->setReference($order_reference); | |
| $payment_request->setSender($customer_name, $order->mail); | |
| $payment_request->setRedirectUrl("http://example.com/pagseguro/return"); | |
| // Shipping rate is handled by Drupal |
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
| api = 2 | |
| core = 7.x | |
| ; Include the definition of how to build Drupal core directly, including patches. | |
| includes[] = "drupal-org-core.make" | |
| ; Download the Commons install profile and recursively build all its dependencies. | |
| projects[taz][type] = "profile" | |
| projects[taz][download][type] = "git" | |
| projects[taz][download][url] = "https://github.com/alexweber/Taz.git" |
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 | |
| namespace Drupal\my_page\PageControllers; | |
| class MyPage implements \Drupal\cool\Controllers\PageController { | |
| public static function accessCallback() { | |
| return 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
| "use strict" | |
| @Application = angular.module("numberAbbrevFilter", []) | |
| @Application.filter "numberAbbrev", -> | |
| (number) -> | |
| if number >= 10000000 | |
| return (number / 1000000).toFixed(0) + 'M' |
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
| drush = require 'drush-node' | |
| destinations = | |
| js: 'assets/js' | |
| gulp.task 'drupal-minifyjs', -> | |
| drush.init() | |
| .then () -> | |
| drush.exec('php-eval "print realpath(\'.\')"') | |
| .then (realpath) -> |
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
| function HOOK_ranking() { | |
| $rankings = array(); | |
| $types = node_type_get_types(); | |
| foreach ($types as $type) { | |
| $rankings[$type->type . '_node_type_boost_search'] = array( | |
| 'title' => t('Boost "' . $type->name . '" nodes'), | |
| 'arguments' => array(':type' => $type->type), | |
| 'score' => ' FIND_IN_SET(n.type, :type)', | |
| ); | |
| } |
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
| var Q = require('q'), | |
| os = require('os'), | |
| path = require('path'), | |
| _ = require('underscore'), | |
| data_path = require('nw.gui').App.dataPath; | |
| /** Default settings **/ | |
| var Settings = {}; | |
| // User interface |
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
| public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { | |
| $fields['id'] = BaseFieldDefinition::create('integer') | |
| ->setLabel(t('ID')) | |
| ->setDescription(t('The ID of the Voting API Vote entity.')) | |
| ->setReadOnly(TRUE); | |
| $fields['uuid'] = BaseFieldDefinition::create('uuid') | |
| ->setLabel(t('UUID')) | |
| ->setDescription(t('The UUID of the Voting API Vote entity.')) |
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
| $schema['votingapi_vote'] = array( | |
| 'fields' => array( | |
| 'vote_id' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), | |
| 'entity_type' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'node'), | |
| 'entity_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), | |
| 'value' => array('type' => 'float', 'not null' => TRUE, 'default' => 0), | |
| 'value_type' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'percent'), | |
| 'tag' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'vote'), | |
| 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), | |
| 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), |
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 | |
| /** | |
| * @file | |
| * Secure password hashing functions for user authentication. | |
| * | |
| * Based on the Portable PHP password hashing framework. | |
| * @see http://www.openwall.com/phpass/ | |
| * | |
| * An alternative or custom version of this password hashing API may be |
OlderNewer