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 | |
/** | |
* Implements hook_field_widget_multivalue_form_alter(). | |
*/ | |
function MODULE_NAME_field_widget_multivalue_form_alter(&$elements, FormStateInterface $form_state, $context) { | |
$field = $context['items']->getName(); | |
$build_info = $form_state->getBuildInfo(); | |
if ($field == "FIELD_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
Allow other domain do Rest request to drupal site: | |
- Use `services.yml`: | |
``` | |
cors.config: | |
enabled: true | |
# Specify allowed headers, like 'x-allowed-header'. | |
allowedHeaders: ['*'] # All header | |
# Specify allowed request methods, specify ['*'] to allow all possible ones. | |
allowedMethods: ['GET'] # Methods |
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
.parent { | |
gap: 20px; | |
.each-item { | |
@supports (-webkit-touch-callout: none) and (not (translate: none)) { | |
margin-top: 20px; | |
margin-right: 20px | |
} | |
} | |
// on desktop |
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
https://symfony.com/doc/current/setup.html#creating-symfony-applications |
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
``` | |
npm i -D browser-sync concurrently | |
``` | |
Copy as `browser-sync.js` in the theme root this code: | |
[browser-sync.js](https://cdn.cacher.io/attachments/u/3ago68caja1c5/bzFc4MHpo5m46G-cPn-bfU-ntMpELydY/browser-sync.js) | |
```js | |
const browserSync = require('browser-sync'); |
OlderNewer