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
#!/usr/bin/env bash | |
branch=`echo ${TRAVIS_BRANCH}`; | |
if [ $branch = "master" ]; then | |
echo "Building assets for production."; | |
gulp build --env production; | |
else | |
echo "Building assets for development."; | |
gulp build --no-watch; |
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 | |
namespace Drupal\iana_netforum_auth\Utility; | |
/** | |
* Class EmailMatcher. | |
* | |
* @package Drupal\iana_netforum_auth\Utility | |
*/ | |
class EmailMatcher { |
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 | |
namespace Drupal\Tests\iana_netforum_auth\Unit; | |
use Drupal\Tests\UnitTestCase; | |
use Drupal\iana_netforum_auth\Utility\EmailMatcher; | |
/** | |
* Test email matching component class. | |
* |
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 | |
namespace Drupal\harlib_search\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
use GuzzleHttp\Client; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use GuzzleHttp\Exception\RequestException; |
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 | |
use Drupal\Core\Database\Database; | |
/** | |
* Implements hook_install(). | |
*/ | |
function mymodule_install() { | |
$connection = Database::getConnection('default'); |
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
package main | |
import "fmt" | |
import "net/http" | |
import "io/ioutil" | |
import "time" | |
import "log" | |
func main() { | |
var url = "[redacted]/api/v1/room" |
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 | |
/** | |
* Implements hook_preprocess_field(). | |
*/ | |
function mytheme_preprocess_field(&$variables) { | |
if ($variables['element']['#entity_type'] == 'paragraph' && $variables['field_name'] == 'field_reference_link') { | |
foreach ($variables['items'] as $key => $item) { | |
$variables['items'][$key]['content']['#options']['attributes']['class'][] = 'hl__link-tag'; | |
} |
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 | |
/** | |
* Implements hook_preprocess_paragraph(). | |
*/ | |
function mytheme_preprocess_paragraph(&$variables) { | |
$paragraph = $variables['elements']['#paragraph']; | |
$bundle = $paragraph->getType(); | |
if ($bundle == 'fancy_links') { |
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 | |
declare(strict_types = 1); | |
namespace Drupal\harlib_restful_normalizer\Normalizer; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\Url; | |
use Drupal\harlib_libcal_api\LibCalApi; | |
use Drupal\image\Entity\ImageStyle; |
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 | |
namespace Drupal\harlib_random_entity_display\Plugin\Field\FieldFormatter; | |
use Drupal\Core\Field\FieldItemListInterface; | |
use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceEntityFormatter; | |
/** | |
* Plugin implementation of the 'random_entity_field_formatter' formatter. | |
* |