This file contains 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 | |
/** | |
* @file | |
* Contains \Drupal\mymodule\MyModuleController | |
*/ | |
namespace Drupal\mymodule\Controller; | |
use Drupal\Core\Controller\ControllerBase; |
This file contains 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 | |
use Drupal\node\Entity\Node; | |
use Drupal\user\Entity\User; | |
/** | |
* Implements hook_ENTITY_TYPE_update(). | |
* If a user has a Role named 'moderated', | |
* append the words 'MODERATED USER' to titles of | |
* all the nodes authored by the user |
This file contains 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 | |
/** | |
* Controller for the Block in the lotus module for D8. | |
* Add this file to src/Plugin/Block/ folder of the module | |
**/ | |
namespace Drupal\lotus\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; | |
/** |
This file contains 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 | |
/** | |
* Controller file for Lotus Drupal 8 module. | |
* Place this file in src/Controller folder inside the lotus module folder | |
**/ | |
namespace Drupal\lotus\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
class HelloController extends ControllerBase { |
This file contains 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
window.onload = function(e){ | |
document.getElementById("btn1").addEventListener('dblclick', myAlert); | |
var li = document.getElementsByTagName("li") | |
for (i=1;i<li.length; i++){ | |
li[i].addEventListener('mouseover', function(e){ | |
console.log('Hey, you were here!'); | |
console.log(e); | |
}); | |
} |
This file contains 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> | |
<style> | |
div, section, footer, header{ | |
padding:10px;border:1px solid green; | |
} | |
header, footer{text-align:center;} | |
.container { | |
padding:0; | |
max-width:960px; /*used for limiting the width*/ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<div>Object Oriented JS - Work with Console!</div> | |
<script> |
This file contains 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> | |
<script src="js/jquery-1.9.1.js"></script> | |
<style> | |
div, section, footer, header{ | |
padding:10px;border:1px solid green; | |
} | |
header, footer{text-align:center;} | |
.container { | |
padding:0; |
This file contains 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
body { | |
margin: 20px; | |
padding: 0; | |
font-family: "Georgia", serif; | |
line-height: 150%; | |
} | |
h1 { | |
line-height: 100%; | |
} |
This file contains 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
[ | |
{ | |
"id":0, | |
"name":"Amitabh Bacchan", | |
"type":"Bollywood", | |
"twitter":"SrBachchan", | |
"desc":"Amitabh is my most favorite hero" | |
}, | |
{ | |
"id":1, |
NewerOlder