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
// in preprocessing.php | |
$variables['lead_form'] = | |
\Drupal::formBuilder()->getForm('Drupal\my_form_module\Form\LeadForm', 'hero_video'); | |
//it passes that extra variable through getForm into an arguments array added on the end of buildForm | |
public function buildForm(array $form, FormStateInterface $form_state, string $gated_content_context = NULL) { | |
if($gated_content_context === 'hero_video') { |
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 | |
// Turn off all error reporting | |
error_reporting(0); | |
// Configuration | |
$user = 'your_login'; | |
$password = 'you_password'; | |
$host = 'imap.gmail.com'; |
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
<div class="newsletterSignUpFooter"> | |
<div class="form-group">[text* your-name class:form-control class:input-lg] <label for="your-name">First Name</label></div> | |
<div class="form-group">[text* text-777 class:form-control class:input-lg] <label for="your-name">Last Name</label></div> | |
<div class="form-group">[email* your-email class:form-control class:input-lg] <label for="your-name">Your Email</label></div> | |
<div class="">[submit class:btn class:btn-warning class:btn-lg class:w100 "Send"]</div> | |
</div> |
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 | |
$PLAYLIST_URL = 'http://www.bbc.co.uk/radio/listen/live/r1.pls'; | |
set_time_limit(5); | |
// Fetch and parse a .pls playlist file | |
// @returns an array of URLs in the playlist | |
function readPlaylist($url) |