This file contains hidden or 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\Core\Database\Database; | |
/** | |
* Implements hook_schema(). | |
*/ | |
function dots_schema() { | |
$schema['dots_table'] = [ | |
'description' => 'dots table', | |
'fields' => [ | |
'id' => [ |
This file contains hidden or 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
function dots_views_data() { | |
// Group Dots Table | |
$data['dots_table']['table']['group'] = t('Dots Table'); | |
$data['dots_table']['table']['base'] = array( | |
'field' => 'nid', | |
'title' => t('Dots Table'), | |
'help' => t('Example table contains example content and can be related to nodes.'), | |
'weight' => -10, | |
); |
This file contains hidden or 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
wget https://ftp.drupal.org/files/projects/drupal-8.5.6.tar.gz | |
tar -zxf drupal-*.tar.gz | |
chmod -R 777 drupal-8.5.6 | |
rm -r drupal-8.5.6.tar.gz | |
mv /home/radhe/Desktop/drupal-8.5.6 /home/radhe/Desktop/d8 |
This file contains hidden or 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
1. Solr Server setup | |
----------------------------------------------------------------------------- | |
Use below link as a reference | |
https://www.webfoobar.com/node/16 | |
https://valuebound.com/resources/blog/installing-configuring-apache-solr-520-with-drupal-7-using-search-api-ubuntu-1404 | |
1. If Java is not installed, check the available versions of Java and install it: | |
yum list available java* | |
yum install java-1.8.0-openjdk.x86_64 | |
----------------------------------------------- |
This file contains hidden or 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
How To Set Up Apache Virtual Hosts on Ubuntu : - | |
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts | |
Step One — Create the Directory Structure | |
sudo mkdir -p /var/www/dev.drupal.com | |
sudo mkdir -p /var/www/dev.rwjf2.com | |
Step Two — Grant Permissions | |
sudo chmod -R 755 /var/www |
This file contains hidden or 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>Jquery Str</title> | |
<meta charset="utf-8"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
/* accordion */ | |
$('.accordion-header').click(function(){ |
This file contains hidden or 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
Example: | |
use Drupal\Component\Render\FormattableMarkup; | |
$text = new FormattableMarkup('My name is @name', ['@name' => "The name"]); | |
Theme table row to link particular column data. | |
Example: | |
use Drupal\Component\Render\FormattableMarkup; | |
$rows[] = [ | |
'data' => [ | |
'name' => new FormattableMarkup('<a href=":link">@name</a>', [':link' => $url, '@name' => $name]), |
This file contains hidden or 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
<a class="use-ajax" data-dialog-type="modal" data-dialog-options='{"height":"475","width":"640"}' | |
href="{{ path }}"> {{ field_video_thumbnail_image }} </a> |
This file contains hidden or 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
function education_start_end_validates(array &$form, FormStateInterface $form_state) { | |
foreach ($form_state->getValue('edu_education_field') as $key => $value) { | |
if($value['start_date'] > $value['end_expected_end_date']) { | |
$form_state->setErrorByName("end_expected_end_date", t('Education : End/Expected End Date should be the greater than Start Date.')); | |
} | |
} | |
} |
This file contains hidden or 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
http://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effect | |
https://www.drupal.org/node/116539 | |
http://makitweb.com/category/jquery/ | |
geeksforgeeks.org | |
http://www.ryanwright.me/cookbook/drupal7/table/table-drag/simple |