Skip to content

Instantly share code, notes, and snippets.

View heyrocker's full-sized avatar

Greg Dunlap heyrocker

View GitHub Profile
interface KeyValueInterface
class ConfigStorage implements KeyValueInterface
class FileConfigStorage extends ConfigStorage
class SignedFileConfigStorage extends FileConfigStorage
class ActiveConfigStorage extends ConfigStorage
class SQLActiveConfigStorage extends ActiveConfigStorage
class RedisActiveConfigStorage extends ActiveConfigStorage
interface KeyValueInterface {
/**
* Constructs a new key/value collection.
*
* @param $collection
* The collection for which the object is created.
*/
function __construct($collection);
/**
$field_name = 'field_article_type';
// Get the field info
$original_field = field_info_field($field_name);
$settings = $original_field['settings'];
$settings['allowed_values'] = array(
'articles' => 'Articles',
'news' => 'News',
'videos' => 'Videos',
);
// Create the data array that will be forced manually
calendar: {
7113: {
calendar_id: "7113",
tournament_id: "1316",
tournament_name: "Pintastic Pin-O-rama Pingolf Tournament",
city: "Las Vegas",
state: "NV",
country_name: "United States",
country_code: "US",
euro_champ_flag: "N",
calendar: [
{
calendar_id: "6888",
tournament_id: "1454",
tournament_name: "X-tra Ball Monthly Tournament",
city: "Charlotte",
state: "NC",
country_name: "United States",
country_code: "US",
euro_champ_flag: "N",
PRODUCTION:
http://170.171.208.162:8081/solr/rhcanada/select?fl=item_id%2Cscore&qf=tm_body%24value%5E2.0&qf=tm_field_article_category%24name%5E1.0&qf=tm_field_author_ref%24title%5E5.0&qf=tm_field_description%24value%5E1.0&qf=tm_field_division%24name%5E1.0&qf=tm_field_flapcopy%24value%5E1.0&qf=tm_field_full_length_title%5E3.0&qf=tm_field_imprint%24title%5E3.0&qf=tm_field_isbn%5E21.0&qf=tm_field_isbn10%5E21.0&qf=tm_field_related_authors%24title%5E2.0&qf=tm_field_related_books%24title%5E2.0&qf=tm_field_related_content%24title%5E2.0&qf=tm_field_relatedisbns%24field_sub_title%5E2.0&qf=tm_field_relatedisbns%24field_subtitle%5E1.0&qf=tm_field_relatedisbns%24title%5E2.0&qf=tm_field_rhc_short_title%5E1.0&qf=tm_field_series%24name%5E2.0&qf=tm_field_slices%24title%5E1.0&qf=tm_field_spotlight%24value%5E1.0&qf=tm_field_sub_title%5E2.0&qf=tm_field_subjectcategories%24api_content_id%5E1.0&qf=tm_field_subjectcategories%24name%5E1.0&qf=tm_field_subtitle%5E2.0&qf=tm_field_tags%24name%5E1.0&qf=tm_title%5E8.0&fq=%2A%3A%2A%20AND%
diff --git a/access_unpublished.module b/access_unpublished.module
index f2b7db5..cb42c03 100644
--- a/access_unpublished.module
+++ b/access_unpublished.module
@@ -34,6 +34,12 @@ function access_unpublished_permission() {
'title' => t('View unpublished contents'),
'description' => t('Allow users to view unpublished contents with unique key in URL path'),
);
+ if (module_exists('workbench_moderation')) {
+ $permissions['access unpublished view workbench moderation drafts'] = array(
initialize state vars
$menu_hierarchy = array();
$last_column = 1;
$last_menu_item = array();
while there are records to read
$node = array();
get record into $record;
$record = array_filter($record); // Strip empty values while retaining indexes
$title_column = key($record); // Get the index for the first column, which will be the one with our title in it
<?php
namespace Drupal\csv_content_import\Forms;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Component\Utility\UrlHelper;
use Drupal\node\Entity\Node;
use Symfony\Component\Validator\Constraints\Null;
use Drupal\menu_link_content\Entity\MenuLinkContent;
<?php
public function getSOMPath($url, $path, $langcode) {
// Load the site's parent link configuration.
/** @var \Drupal\Core\Config\ImmutableConfig $site_config */
$site_config = \Drupal::config('som_breadcrumb.settings');
$data = $site_config->get('site.active_trail');
// Load the site homepage alias
$site_config = \Drupal::config('system.site');