Skip to content

Instantly share code, notes, and snippets.

View vijaycs85's full-sized avatar

Vijaya Chandran Mani vijaycs85

View GitHub Profile
<?php
$lm = new \LanguageManager();
$lm->getLanguages();
Class LanguageManager {
protected $language;
public function getLanguages() {
# in ~/.bashrc or ~/.bash_profile in OSX
# Jump to comment section of d.o issue, if local git branch = issue nid
alias issue='open /Applications/Google\ Chrome.app https://www.drupal.org/node/$(git symbolic-ref -q HEAD 2>/dev/null | sed '\''s/^refs\/heads\/\([0-9]*\).*/\1/'\'')#project-issue-ajax-form'
# Include/Exclude patch directory to PHPStorm to compare two patches.
alias patchl='ln -s /www/htdocs/patches/ /www/htdocs/drupal8/patches'
alias patchul='rm /www/htdocs/drupal8/patches'
diff --git a/core/lib/Drupal/Core/Language/LanguageInterface.php b/core/lib/Drupal/Core/Language/LanguageInterface.php
index c3e39a7..ee4f2ba 100644
--- a/core/lib/Drupal/Core/Language/LanguageInterface.php
+++ b/core/lib/Drupal/Core/Language/LanguageInterface.php
@@ -110,6 +110,14 @@
public function getName();
/**
+ * Sets the name of the language.
+ *
hook_field_info() Replaced by annotation-based plugin discovery, using the \Drupal\Core\Field\Annotation\FieldType annotation class
+ FieldItemInterface::defaultSettings() / FieldItemInterface::defaultInstanceSettings() (static methods)
hook_field_schema() FieldItemInterface::schema() (static method)
hook_field_settings_form() FieldItemInterface::settingsForm()
hook_field_instance_settings_form() FieldItemInterface::instanceSettingsForm()
hook_field_is_empty() ComplexDataInterface::isEmpty()
hook_field_presave() FieldItemInterface::preSave()
hook_field_insert() FieldItemInterface::insert()
hook_field_update() FieldItemInterface::update()
hook_field_delete() FieldItemInterface::delete()
<?php
class ConfigImporter {
protected $storage;
public function setStorage($storage) {
$this->storage = $storage;
}
langcode: en
status: true
dependencies: { }
id: help
label: 'Help module'
body:
value: >
<h3>About</h3><p>The Help module provides <a href="[route:help.main]">Help
reference pages</a> to guide you through the use and configuration of
modules. It is a starting point for
langcode: en
status: true
dependencies: { }
id: action_admin
label: 'Action administration'
body:
value: >
<p>There are two types of actions: simple and advanced. Simple actions
do not require any additional configuration and are listed here
automatically. Advanced actions need to be created and configured before
<?php
// D7
// variable_get('webform_default_from_address', variable_get('site_mail', ini_get('sendmail_from')));
// D8
$site_default = config('system.site')->get('mail', ini_get('sendmail_from'));
config('webform.settings')->get('default_from', $site_default);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(function ($) {
Drupal.behaviors.menuTree = {
attach: function (context, settings) {
// Set ul depths for better theming.
$('#main-menu ul').each(function () {
var depth = $(this).parents('ul').length;
$(this).addClass('ul-depth-' + depth);
});
// Set ul > li depths for better theming.