Docker container image for DDEV's {{ CONTAINER NAME }} container.
This container image is part of DDEV, and not typically used stand-alone.
{{ FEATURES GO HERE }}
I hereby claim:
To claim this, I am signing this object:
function foo_features_revert_all($force = FALSE) { | |
module_load_include('inc', 'features', 'features.export'); | |
$features_to_revert = array(); | |
foreach (features_get_features(NULL, TRUE) as $module) { | |
if ($module->status) { | |
// If forced, add module regardless of status. | |
if ($force) { | |
$features_to_revert[] = $module->name; | |
} | |
else { |
#!/usr/bin/php | |
<?php | |
/** | |
* @file | |
* A Git pre-commit hook script to check files for PHP syntax errors and Drupal | |
* coding standards violations. Requires phpcs and Coder Sniffer: | |
* | |
* @see https://drupal.org/node/1419988 | |
* Hat tip: dcq.module (DrupalCodeQuality) |
<?php | |
// this goes into turner_ads.install | |
function turner_ads_update_6000(){ | |
$vocabulary = array( | |
'name' => t("Advert type"), //Human readable name of the vocabulary | |
'multiple' => 0, //set 1 to allow multiple selection | |
'required' => 0, //set 1 to make the terms mandatory to be selected | |
'hierarchy' => 0, //set 1 to allow and create hierarchy of the terms within the vocabulary |
<?php | |
/** | |
* An administrative form for our module. | |
*/ | |
function turner_ads_admin_settings() { | |
$form = array(); | |
// Add the content type radio button list | |
$form['turner_ads_content_type'] = array( |
<?php | |
/** | |
* @file turner_ads.module | |
* | |
* This module provides: | |
* - a configurable block for 1 ad | |
* - a block displaying a random ad | |
* - 2 image presets: ad_rectangle and ad_skyscraper | |
* - an admin screen to select which content type and field to use |
<?php | |
function turner_ads_update_6000(){ | |
$vocabulary = array( | |
'name' => t("Advert type"), //Human readable name of the vocabulary | |
'multiple' => 0, //set 1 to allow multiple selection | |
'required' => 0, //set 1 to make the terms mandatory to be selected | |
'hierarchy' => 0, //set 1 to allow and create hierarchy of the terms within the vocabulary | |
'relations' => 0, //set 1 to set and allow relation amongst multiple terms | |
'module' => 'turner_ads', //provide the module name in which the vocabulary is defined and which is calling this function |
<?php | |
/** | |
* Implements hook_help(). | |
*/ | |
function helloworld_help($path, $arg) { | |
switch ($path) { | |
// Main module help for the helloworld module. | |
case 'admin/help#helloworld': | |
return '<p>' . t('Say hello to the world.') . '</p>'; | |
} |