$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
<?php | |
/** | |
* @file | |
* Install, update and uninstall functions for my module. | |
*/ | |
use Drupal\Core\Database\Database; | |
use Drupal\Core\Language\LanguageInterface; | |
/** |
# 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] |
<?php | |
namespace Drupal\custom_rest_api\Plugin\rest\resource; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\rest\ModifiedResourceResponse; | |
use Drupal\rest\Plugin\ResourceBase; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\Core\Session\SessionManagerInterface; |
Attention Wamp/Wordpress/windows users. I had this issue for hours and not even the correct answer was doing it for me, because i was editing the wrong php.ini file because the question was answered to XAMPP and not for WAMP users, even though the question was for WAMP.
here's what i did
Download the certificate bundle.
Put it inside of C:\wamp64\bin\php\your php version\extras\ssl