Drupal 8.x

Drupal 8 notes

  1. urls
    $current_url = \Drupal\Core\Url::fromRoute('<current>', array(), array("absolute" => TRUE))->toString();  // get full url

     

  2. Variables
    Drupal\Core\Site\Settings::get('some_setting_here'); // Get a setting from settings.php