As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
This file contains 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 | |
// Source https://www.flocondetoile.fr/blog/provide-custom-mode-form-entities-drupal-8 | |
/** | |
* Implements hook_entity_type_build(). | |
*/ | |
function my_module_entity_type_build(array &$entity_types) { | |
$entity_types['user']->setFormClass('profil', 'Drupal\user\ProfileForm'); | |
} |
This file contains 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 | |
// Source https://www.droptica.com/blog/custom-entity-forms-example-user-editing-and-registration/ | |
/** | |
* Implements hook_entity_type_build(). | |
*/ | |
function my_module_entity_type_build(array &$entity_types) { | |
$form_modes = ['custom_form_mode_1', 'custom_form_mode_2']; |
This file contains 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 | |
namespace Drupal\axl_ks_topics\Plugin\EntityReferenceSelection; | |
use Drupal\Component\Utility\Html; | |
use Drupal\Core\Database\Connection; | |
use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginBase; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\Entity\Query\QueryInterface; | |
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; |
This file contains 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 | |
namespace Drupal\sandbox\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormInterface; | |
use Drupal\Core\Form\FormState; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\node\Entity\Node; | |
use Drupal\user\Entity\User; |
This file contains 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 | |
/** | |
* @file | |
* Contains \Drupal\example\Entity\Example. | |
*/ | |
namespace Drupal\example\Entity; | |
use Drupal\Core\Entity\EntityStorageInterface; | |
use Drupal\Core\Field\BaseFieldDefinition; |
This file contains 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
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_geoforce { | |
server 127.0.0.1:3000; | |
} | |
upstream app_pcodes{ | |
server 127.0.0.1:3001; | |
} |
This file contains 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
http { | |
upstream backend_uat { | |
server <server 1 ip> max_fails=1 fail_timeout=5s; | |
server <server 2 ip>; | |
} | |
server { | |
listen <nginx public ip>:443 ssl default_server; | |
server_name *.test.com www.*.test.com |
Workbooks that were referenced during analysis.(The state of the WBs when referred to, were dated between 20th Aug - 22nd Aug 2019)
- UPR - Asia Shared Site - UPR - New Client Request Form_v2.0 (1)
- Unilever - Crown NAM - New Client Request Form - UL Domestic v2.6
- TWE - New Client Request Form+Custom IF with CP v16
- Volvo - Crown Global - New Client Request Form_Volvo_v1.4
- BP - Asia - New Client Request Form_British Petroleum Asia Pacific v1.6
- HAVI - NAM Client Configuration Workbook v1.8
This file contains 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 | |
// Drupal 7 implement your custom hook_info() | |
/** | |
* Gets information about a authentication module. | |
* | |
* @param string $module | |
* The module to get info for. | |
* @return mixed | |
* The information array, or FALSE if the information wasn't found. |