To set which other entity type should your field reference you can do it with this settings on base field
To set which other entity type should your field reference you can do it with this settings on base field
When creating custom entity you will use "BaseFieldDefinition" code snippets where you will define many things about this field, one of the things you may want to define is suffix or prefix that will be used in display of this field either on entity view or on views that use this field. To do that you will add it to setSettings array simple as 'suffix' => '%'
Do this on your local or virtual enviroment, depending where do you want to have it
mkdir ~/drush10
cd ~/drush10
composer require "drush/drush:10.*"
this will install drush10 to that directory and now you just need to add alias
To add multiple ssh keys to your system, you need to edit config file ~/.ssh/config and put lines like below, this will also help store password for your ssh in keychain and use agent forwarding so you can use your keys on virtual machines like vagrant
When building forms it is useful to have widgets that select multiple values for you and enhance UI, if you have large select list I would recommend to use select2 module to make custom form use its widget you should first get an array of elements in a variable, like
As Batch is dependent on the order of query string parameters if you are using Fastly or some other CDN they often have "Query String Sort" enabled or it is a good practice to do that, as it will result in more cache hits for you.
Want to make a quick patch for changes you made in some contrib module to submit it to d.org ?
Write down this and submit the file
git diff > my_changes.patch
if you want diff from staged files use
git diff --cached > my_changes.patch
To change paths of the patch use
If you get error like in subject when doing import of configuration, there is a good chance someone forgot to add some YAML file. In example
You should have BREW installed and then run
brew install php@7.4
If you get problem with linking newly installed PHP and get error like
Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.
next thing to do is this.
Drupal removed its automatic entity-updates API in 8.7. See https://www.drupal.org/node/3034742. so you can no longer run drush entup in your CLI, at least unless you install this module https://www.drupal.org/project/devel_entity_updates