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 | |
* @author Rakesh James | |
* Contains \Drupal\example\Controller\ExampleController. | |
* Please place this file under your example(module_root_folder)/src/Controller/ | |
*/ | |
namespace Drupal\example\Controller; | |
/** | |
* Provides route responses for the Example module. |
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 | |
* The following code from the "example.module" will help you to find the example using AJAX form with one textfield called “Name”. When the submit button is pressed, it shows the output “Hello <Name>”. | |
*/ | |
/** | |
* Implementing hook_menu(). | |
*/ | |
function example_menu() { |
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 | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function example_form_alter(&$form, &$form_state, $form_id) { | |
// You might want to filter by content type. | |
if ($form_id == 'YOUR_content_type_node_form') { | |
// Add a cancel button. | |
$form['actions']['cancel'] = array( |
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 | |
global $base_url; | |
print "<div class = 'auto-click'><a href='" . $base_url . "/video/1?width=500&height=500' class = 'colorbox-load'></a></div>"; | |
if (!empty($_GET['banner'])) { | |
$thankyou = $_GET['banner']; | |
if ($thankyou == 'yes') { | |
echo "<script langauge='javascript'> | |
jQuery(window).load(function(){ | |
jQuery('.auto-click a').click(); | |
}); |
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
# This is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} |
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 | |
* Example for button act like "Clear all caches" in the custom form in custom module | |
* @author Rakesh James | |
* | |
*/ | |
/** | |
* Implementing hook_menu(). |
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 | |
/** | |
* Implementing hook_form_alter() | |
* @param $form | |
* @param $form_state | |
* @param $form_id | |
*/ | |
function YOUR_MODULE_NAME_form_alter(&$form, $form_state, $form_id) { | |
if ($form_id == 'views_exposed_form') { | |
$term_reference_tree_path = drupal_get_path('module', 'term_reference_tree'); |
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
server { | |
listen 80 default_server; | |
root /srv/www/drupal8; | |
index index.php index.html index.htm; | |
server_name YOUR_SERVER_NAME.com; | |
location / { | |
try_files $uri @rewrite; | |
} |
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
name: Example Profile | |
type: profile | |
description: Example for profile creation in Drupal8. | |
core: 8.x | |
distribution: | |
name: Example Distribution. | |
dependencies: | |
- automated_cron |
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 | |
* Enables modules and site configuration for the Example Profile profile. | |
*/ | |
// Add any custom code here like hook implementations. |
OlderNewer