Skip to content

Instantly share code, notes, and snippets.

View crittermike's full-sized avatar

Mike Crittenden crittermike

View GitHub Profile
@crittermike
crittermike / get_node_by_path.php
Created September 16, 2016 15:15 — forked from thagler/get_node_by_path.php
Drupal 8 Get node ID by path alias
<?php
$path = \Drupal::service('path.alias_manager')->getPathByAlias('/this-is-the-alias');
if(preg_match('/node\/(\d+)/', $path, $matches)) {
$node = \Drupal\node\Entity\Node::load($matches[1]);
}
@crittermike
crittermike / p2_drupal_pr_template.md
Created August 10, 2016 15:04 — forked from mirie/p2_drupal_pr_template.md
P2 PR Template Draft (Drupal Project)

Definition of Done:

This section is for your verification before submitting a PR. Remove this before submitting:

  • Has any required automated testing been written/updated?
  • Has the documentation been added/updated?
  • Is there appropriate logging included?
  • Does this add new modules/themes? If so:
    • Has the make file been updated?
    • Has the install profile's info file been updated?
    • Have you run a test build locally to confirm your new modules/themes get downloaded and enabled properly?
  • Does this add new configuration? If so: