PHPStorm 8 supports most D8 features including Twig templates, container links, namespaces etc. To enable full support:
- Log into the admin section at localhost:8888/user.
- Make sure that the following plugins are enabled:
(function($) { | |
/** | |
* TVE Player wrapper behavior. Kick off the player in the page. | |
*/ | |
Drupal.behaviors.sharedTVEPlayerWrapper = { | |
attach: function(context, settings) { | |
// We kinda need the following in order to continue. | |
if (!tve || !tve.adobePass) { | |
return; |
/** | |
* @file | |
* Paging for card feeds. | |
*/ | |
(function($) { | |
Drupal.behaviors.cardFeed = { | |
attach: function(context, settings) { | |
$('.card-feed-pager__link').once('card-feed-pager', function() { |
PHPStorm 8 supports most D8 features including Twig templates, container links, namespaces etc. To enable full support:
// In a perfect world, you'd never have to do this. Wish I lived in a perfect world. | |
/** | |
* Convert a string to a usable class name | |
* @param {string} stringToConvert String of text | |
* @return {string} Usable class name | |
*/ | |
function convertStringToClassName(stringToConvert) { | |
if (typeof stringToConvert === 'string') { | |
return stringToConvert.trim().replace(/[\s-_]+/g, '-').replace(/[^\w-]|^-|-$/g, '').replace(/-+(?=-)/, '').toLowerCase(); |
// Straight posts | |
// Works! By giving the href query string param as the Facebook post component URL | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/latentximage/posts/1746511762041579&width=500" width="500" height="626" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
// Resulting Facebook post component | |
{ | |
"URL": "https://www.facebook.com/latentximage/posts/1746511762041579", | |
"role": "facebook_post", | |
"layout": "spacerLayout" | |
} |