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\tools_ext\Plugin\Field\FieldFormatter; | |
use Drupal\Core\Field\FieldItemListInterface; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceLabelFormatter; | |
use Drupal\Core\Url; | |
use Drupal\Component\Serialization\Json; |
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
# source: https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/ | |
# To redirect all users to access the site WITH the 'https://www. | |
RewriteEngine On | |
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301] |
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
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [[ "d881" == "$branch" ]]; then | |
git --work-tree=/var/www/vhosts/fwi.stage/ checkout -f $branch | |
echo 'Changes pushed d881 branch to fwi.stage' |
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 | |
// ... | |
/** | |
* {@inheritdoc} | |
*/ | |
public function submitForm(array &$form, FormStateInterface $form_state) { | |
$module_path = $this->extensionListModule->getPath('cpct_config'); |
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 | |
/** | |
* Update existing nodes cp property to false. | |
*/ | |
function uneo_pcf_cp_post_update_node_cp_prop(&$sandbox) { | |
$entity_type_id = 'node'; | |
$id_name = 'nid'; | |
_update_entity_cp_property($sandbox, $entity_type_id, $id_name); | |
} |
OlderNewer