Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Crittenden mikecrittenden

View GitHub Profile
@mikecrittenden
mikecrittenden / get_node_by_path.php
Created Sep 16, 2016 — forked from thagler/get_node_by_path.php
Drupal 8 Get node ID by path alias
View get_node_by_path.php
<?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]);
}
@mikecrittenden
mikecrittenden / p2_drupal_pr_template.md
Created Aug 10, 2016 — forked from mirie/p2_drupal_pr_template.md
P2 PR Template Draft (Drupal Project)
View p2_drupal_pr_template.md

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: