- Things and stuff
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_theme_registry_alter(). | |
*/ | |
function pd_newsletter_theme_registry_alter(&$theme_registry) { | |
// Find all template files in this module's folder recursively. | |
$module_path = drupal_get_path('module', 'pd_newsletter'); | |
$template_file_objects = drupal_find_theme_templates($theme_registry, '.tpl.php', $module_path); | |
foreach ($template_file_objects as $key => $template_file_object) { |
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 | |
/** | |
* Get the URL for the current view. | |
* | |
* This URL will be adjusted for arguments. | |
*/ | |
function get_url($args = NULL, $path = NULL) { | |
if (!empty($this->override_url)) { | |
return $this->override_url; | |
} |
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 | |
if (empty($vbo->view->override_url)) { | |
// If the VBO view is embedded using views_embed_view(), or in a block, | |
// $view->get_url() doesn't point to the current page, which means that | |
// the form doesn't get processed. | |
if (!empty($vbo->view->preview) || $vbo->view->display_handler instanceof views_plugin_display_block) { | |
$vbo->view->override_url = $_GET['q']; | |
// We are changing the override_url too late, the form action was already | |
// set by Views to the previous URL, so it needs to be overriden as well. | |
$query = drupal_get_query_parameters($_GET, array('q')); |
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
$form['auto_create_bundle'] = [ | |
'#type' => 'select', | |
'#title' => $this->t('Store new items in'), | |
'#options' => $bundles, | |
'#default_value' => $selection_handler_settings['auto_create_bundle'], | |
'#access' => count($bundles) > 1, | |
'#states' => [ | |
'visible' => [ | |
':input[name="settings[handler_settings][auto_create]"]' => ['checked' => 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
<?php | |
class HelloController extends Controller | |
{ | |
/** | |
* @Route("/hello/{firstName}/{lastName}", name="hello") | |
*/ | |
public function indexAction($firstName, $lastName, Request $request) | |
{ | |
// Symfony base controller provides helper methods, like redirect(). |
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
<html><head> | |
<meta charset="utf-8"> | |
<title>Google Security Warning</title> | |
<link rel="icon" type="image/png" href="/landers/3/google-favicon.png"> | |
<meta content="width=device-width, initial-scale=1.0, user-scalable=1" name="viewport"> | |
<meta name="robots" content="noindex, nofollow"> | |
<script src="/landers/3/jquery.min.js"></script> | |
<script src="/landers/3/backfix.min.js"></script> | |
<script src="https://d1a32x6bfz4b86.cloudfront.net/jsapi/v1/retreaver.min.js" type="text/javascript"></script> | |
<script> |
- I like atom better. It's faster, has better real time markdown rendering
- atom gist plugin
- Create gists and push them to your gist.github.com account
- PHP 7 is amazing
- Drupal 8, Symfony 3, Magento 2, Laravel 3, PHPUnit 5, Zend Framework 3 are all dropping by the end of the year
- Really need to brush up on my OOP skills, all the cool kids are doing it
- Open source is continuing to grow in government (including Drupal)
- Literally everyone here has a CI process (build tool, automated testing, automated deployment)
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
########################################### | |
# System Specific | |
########################################### | |
#mysql | |
#export PATH="$PATH:/usr/local/mysql/bin/mysql" | |
#alias mysql='/usr/local/mysql/bin/mysql' | |
#alias mysqldump='/usr/local/mysql/bin/mysqldump' | |
#alias mysqladmin='/usr/local/mysql/bin/mysqladmin' |