By editor, 30 September, 2021 Translation API - PHP Twig JavaScript Tags Drupal 8 Drupal 9 Translation JavaScript Twig PHP PHP Class using StringTranslationTrait StringTranslationTrait allow to get t() and formatPlural() methods Example:use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslationInterface; class MyClass {
By editor, 13 August, 2021 Import config file programmatically on Drupal 9 Tags Drupal 9 Code Configuration Import configuration file programmatically on Drupal 9 using config_update contrib module and service //Update Module settings \Drupal::service('config_update.config_update')->revert('system.simple', 'mymodule.settings');
By editor, 24 June, 2021 State API Tags Drupal 8 Code Drupal 9 State servic eallow to store variables such as state of the server temporarily or permanently Examples:
By editor, 15 June, 2021 Drupal Site Settings : Using settings.php Tags Drupal 8 Code Settings Drupal settings file can contains variable which can use to use for different configuration in different environments. Example: env_name default_info_nid $settings['env_name'] = 'Local'; $settings['default_info_nid'] = 1';
By editor, 6 April, 2021 Squash commits into one with Git, Rebase Tags Git Steps: 1. Update branchegit reset --hard origin/features/BRANCHNAME OR git pull origin features/BRANCHNAME