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
LANG_TRANSLATE = https://drupal.stackexchange.com/questions/249408/how-to-create-a-list-of-untranslated-content-in-views/249411#249411 | |
/* Get Path */ | |
$path = \Drupal::request()->getpathInfo(); | |
$arg = explode('/',$path); | |
/*Get User info */ | |
$current_user = \Drupal::currentUser(); | |
/* http://drupal8.support/en/ontdek */ |
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 | |
$server = "localhost"; | |
$username = "xxxx"; | |
$pasword = "xxxx"; | |
$dbName = "xxxx"; | |
$conn = new mysqli($server, $username, $pasword, $dbName); | |
if($conn->connect_error) { | |
die('Connection Error'. $conn->connect_error); | |
} |
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
print_r(array_filter($numbers, 'isPositive')); | |
function isPositive($val) { | |
//return ($val > 50) ? true : false; | |
if($val%2 == 1) { | |
return $val; | |
} | |
} |
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 |
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
<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
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
<!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
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
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 | |
----------------------------------------------- |
OlderNewer