Skip to content

Instantly share code, notes, and snippets.

View iberezovchuk's full-sized avatar
🐘
\m/

Igor Berezovchuk iberezovchuk

🐘
\m/
View GitHub Profile
@MatthieuScarset
MatthieuScarset / MyCustomForm.php
Last active November 11, 2023 20:24
Drupal - Autosubmit exposed form in JS
<?php
namespace Drupal\mymodule\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Provides a custom form.
*/
@RuZniki
RuZniki / drupal-8.form.reset-button.php
Last active November 10, 2023 09:39
Drupal 8 Adding a Reset Button to a form
<?php
/**
* Implements template_preprocess_form().
*/
function TEMPLATE_preprocess_form(&$vars) {
$vars['form']['actions']['reset'] = [
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => [
'class' => 'button',
@andriyun
andriyun / backup-drupal-project.yml
Last active January 7, 2021 03:06
ansible backup playbook
---
- hosts: [hostgroup]
# hostgroup name to aplly playbook from ~/.ansible/hosts
vars:
project_name: [project_name]
# project name for backup files
document_root_location: [document_root_location]
# document root location path without trailing slash
# Example: /home/dtest01
document_root_folder: [document_root_folder]