- Создайте файл
Postman.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/Postman/Postman
Name=Postman
Postman.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/Postman/Postman
Name=Postman
<?php | |
/** | |
* PHPExcel | |
* | |
* Copyright (c) 2006 - 2015 PHPExcel | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 2.1 of the License, or (at your option) any later version. |
# Editor params. | |
/.idea | |
/.editorconfig | |
# Ignore configuration files that may contain sensitive information. | |
sites/*/*settings*.php | |
sites/example.sites.php | |
# Ignore paths that contain generated content. | |
files/ |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE |
Создаем папку drupal
Скачиваем последний релиз docker4drupal
Извлекаем содержимое архива в папку drupal
<?php | |
/** | |
* Implements hook_form_FORM_ID_alter(). | |
*/ | |
function mymodule_form_user_form_alter(&$form, FormStateInterface $form_state, $form_id) { | |
if ($form_id === 'user_form') { | |
$form['actions']['submit']['#submit'][] = '__mymodule_form_user_submit'; | |
} | |
} |
libraries-override: | |
system/base: false | |
system/admin: false | |
system/maintenance: false | |
system/drupal.system: false | |
system/drupal.system.modules: false | |
system/diff: false | |
system/drupal.system.date: false | |
contextual/drupal.contextual-links: false | |
quickedit/quickedit: false |
<?php | |
use Drupal\Core\Form\FormStateInterface; | |
use Symfony\Component\HttpFoundation\Request; | |
function MYMODULE_form_alter(&$form, FormStateInterface $form_state, $form_id) { | |
if ($form_id == 'node_trends_form' || $form_id == 'node_trends_edit_form') { | |
foreach (array_keys($form['actions']) as $action) { | |
if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { | |
$form['actions']['submit']['#submit'][] = 'mymodule_form_submit'; |
<?php | |
$file = File::load($file_id); | |
$uri = $file->getFileUri(); | |
$stream_wrapper_manager = \Drupal::service('stream_wrapper_manager')->getViaUri($uri); | |
$file_path = $stream_wrapper_manager->realpath(); |