This file contains hidden or 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); | |
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\language\ConfigurableLanguageManagerInterface; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\Core\Entity\EntityRepositoryInterface; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; |
This file contains hidden or 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
$view = new view(); | |
$view->name = 'files'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'file_managed'; | |
$view->human_name = 'Files'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
This file contains hidden or 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\exp_fs\Plugin\rest\resource; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\rest\ModifiedResourceResponse; | |
use Drupal\rest\Plugin\ResourceBase; | |
use Drupal\rest\ResourceResponse; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; |
This file contains hidden or 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 FileIdFieldFormatter.php | |
* | |
* field formatter id for file and image | |
* | |
*/ | |
namespace Drupal\custom_fs\Plugin\Field\FieldFormatter; |
This file contains hidden or 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 [[ "master" == "$branch" ]]; then | |
git --work-tree=/var/www/vhosts/bms2/ checkout -f $branch | |
echo 'Changes pushed master to bms2' |
NewerOlder