Editing hosts file on Mac
To edit hosts file on Mac M1 need to execute this command:
sudo nano /private/etc/hosts
To edit hosts file on Mac M1 need to execute this command:
sudo nano /private/etc/hosts
// Install optional config.
$path_to_module = \Drupal::service('extension.path.resolver')->getPath('module', 'dev_tools');
$config_path = $path_to_module . '/config';
$config_source = new FileStorage($config_path);
\Drupal::service('config.installer')->installOptionalConfig($config_source);
If on db import you get error "Unknown collation: 'utf8mb4_0900_ai_ci'"
sed -i '' 's/utf8mb4_0900_ai_ci/utf8mb4_general_ci/g' db.sql
Error response from daemon: Ports are not available: exposing port TCP 127.0.0.1:443 -> 0.0.0.0:0: failed to connect to /var/run/com.docker.vmnetd.sock: is vmnetd running?: dial unix /var/run/com.docker.vmnetd.sock: connect: no such file or directory'
/Applications/Docker.app/Contents/MacOS/install remove-vmnetd
sudo /Applications/Docker.app/Contents/MacOS/install vmnetd
[Docker Desktop for Mac] ERROR ==> connect ENOENT /var/run/docker.sock
To remove all DDEV containers, without creating db backups, also remove stored project data (MySQL, logs, etc.)
ddev remove -a -O -R
To execute database management with sequelace:
ddev sequelace
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc()
This function has been DEPRECATED as of PHP 7.4.0 and REMOVED in 8.0.0.
Update the 'pair' field using an expression to concatenate the fields.
$database = \Drupal::service('database');
$database->update('mono_currency_rates')
->expression('pair', "CONCAT(currency_code_sell, '/', currency_code_buy)")
->isNull('pair')
->execute();
Sort:
Generate the Custom Entity:
Use the following command to generate a custom entity:
Drupal's architecture is built on a modular framework that provides flexibility and extensibility. Key components of the Drupal architecture include: