Drupal 8

Export Configuration using Drupal Console into a Module

Technologies: 

Drupal console can be used to export configuration to an existing module.

Exporting Content Types : Remove UUID and Config hash. Also specify module as ji_custom in this case

vendor/drupal/console/bin/drupal  config:export:content:type  support_ticket --remove-uuid  --remove-config-hash  --module=ji_custom

Exporting Custom Entity types, in this case generated using ECK module

Handling Issues in Migration

Fix "non-existent config entity name returned by FieldStorageConfigInterface::getBundles()"
Normally it will show that a field belongs to a non existing bundle for a node, comment etcetra in log post migration.
Solving a field that does not belong to non existent bundle in a node, example, field_agenda present in a non existent bundle makemeeting of node type

Managing Flag Development In D8

Technologies: 

Check if an entity has been flagged:

/**@var \Drupal\flag\FlagService $flag_service */
$flag_service = \Drupal::service('flag');
$flag = $flag_service->getFlagById($flag_id);
return $flag->isFlagged($node);

Get all flagging users for an entity and flag:

$flagging = $flag_service->getFlaggingUsers($entity, $flag); //  $flag is optional

Flag an entity: