Skip to content

Instantly share code, notes, and snippets.

View cyberlex404's full-sized avatar
🏠
Working from home

Lex Misiuro cyberlex404

🏠
Working from home
View GitHub Profile
@cyberlex404
cyberlex404 / form-validation-tree.php
Last active September 18, 2020 14:05
Drupal 8 Form API
<?php
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
// todo: add to schema.
$form['sync'] = [
'#type' => 'details',
'#title' => $this->t('Synchronization settings'),
<?php
namespace Drupal\arti_custom\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides a 'ContactsBlock' block.
@cyberlex404
cyberlex404 / .gitconfig
Created November 19, 2019 08:01 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
interface MaxMass
{
int Max();
int Min();
int SetCount { get; set; }
}
class Mass : MaxMass
{
int Count;
int [] Elem;
<form class="webpay-payment" data-drupal-selector="webpay-payment" action="https://securesandbox.webpay.by/" method="post" id="webpay-payment" accept-charset="UTF-8">
<input data-drupal-selector="edit-scart" type="hidden" name="*scart" value=""><input data-drupal-selector="edit-wsb-version" type="hidden" name="wsb_version" value="2"><input data-drupal-selector="edit-wsb-language-id" type="hidden" name="wsb_language_id" value="russian"><input data-drupal-selector="edit-wsb-storeid" type="hidden" name="wsb_storeid" value="138746596"><input data-drupal-selector="edit-wsb-order-num" type="hidden" name="wsb_order_num" value="demo-1561621530"><input data-drupal-selector="edit-wsb-test" type="hidden" name="wsb_test" value="1"><input data-drupal-selector="edit-wsb-currency-id" type="hidden" name="wsb_currency_id" value="BYN"><input data-drupal-selector="edit-wsb-seed" type="hidden" name="wsb_seed" value="1561621530"><input data-drupal-selector="edit-wsb-total" type="hidden" name="wsb_total" value="25.25"><input dat
{#
File comments
#}
{%
set classes = [
'layout',
'layout--advice',
]
%}
<?php
namespace Drupal\wa_blogs\EventSubscriber;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Utility\Token;
use Drupal\hook_event_dispatcher\Event\Form\FormAlterEvent;
use Drupal\hook_event_dispatcher\Event\Form\FormIdAlterEvent;
(function ($, Drupal) {
'use strict';
Drupal.behaviors.WaWidgetDragdrop = {
attach: function (context, settings) {
$(".js-slide-drag").owlCarousel({
navigation: true,
pagination: true,
items: 5,
Drupal.behaviors.dragdrop