Skip to content

Instantly share code, notes, and snippets.

@xaqrox
Last active July 6, 2016 19:39
Show Gist options
  • Save xaqrox/e1c86986c36b6adf253c7286c8267c30 to your computer and use it in GitHub Desktop.
Save xaqrox/e1c86986c36b6adf253c7286c8267c30 to your computer and use it in GitHub Desktop.
Pulitzer Site Structure Report

Contexts

Tag: NONE (23)

dashboard

Conditions (All)

  • path
    • dashboard/*
  • user
    • authenticated user

dashboard_default

Conditions (All)

  • path
    • dashboard
    • dashboard/*
    • node/add/post
    • user/*/edit/fbconnect
    • user/*/content_lock
  • user
    • authenticated user

dashboard_edit

Conditions (All)

  • user
    • Administrator
    • Grantee
    • Intern
    • Project Report winner
    • Pulitzer Center staff
    • Student Fellow
    • authenticated user
    • guest
  • user_page
    • which page: form, view
    • which user: current

dashboard_grantees

Conditions (All)

  • path
    • dashboard
    • dashboard/*
    • node/add/post
  • user
    • Administrator
    • Grantee
    • Intern
    • Project Report winner
    • Pulitzer Center staff
    • Student Fellow

dashboard_landing

Conditions (All)

  • path
    • dashboard
  • user
    • authenticated user

dashboard_node_edit

Conditions (Any)

  • node
    • types
      • post
    • mode: form only

dashboard_submit

Conditions (All)

  • path
    • node/add/post
    • dashboard/my-projects
  • user
    • Grantee
    • Project Report winner
    • Student Fellow

dashboard_user_default

Conditions (All)

  • user
    • authenticated user
  • user_page
    • which page: form, view
    • which user: current

dashboard_user_grantee

Conditions (All)

  • user
    • Administrator
    • Grantee
    • Intern
    • Project Report winner
    • Pulitzer Center staff
    • Student Fellow
  • user_page
    • which page: form, view
    • which user: current

for_colleges

Conditions (Any)

  • path
    • education/campus-liaison-program
    • education/join-campus-consortium
  • views
    • campus_consortium

for_students

Conditions (Any)

  • path
    • education/student-reporting
    • education/student-reporting/*
    • education/student-news-action-network
    • education/meet-journalists
    • education/connect-with-journalists
  • views
    • education:page_2

for_teachers

Conditions (Any)

  • path
    • education/class-visits
    • education/lesson-plans
    • education/subjects
    • education/units
    • education/request-class-visit
    • education/tell-us-what-you-need
  • views
    • education:page_1
    • education:page_4

front

Conditions (Any)

  • path
    • <front>

modesto_global

Conditions (Any)

  • entity_field
    • entity_type
      • node
    • field_name: field_project
    • field_value: 11012
    • field_empty: 0
  • path
    • ~node/12765
    • node/11206
    • node/11206/*
    • node/11012
    • node/11012/*
  • views
    • responses:page

project_overview

Conditions (Any)

  • views
    • projects:page_6

project_qa

Conditions (Any)

  • node
    • types
      • qa
    • mode: page only

project_social

Conditions (All)

  • entity_field
    • entity_type
      • node
    • field_name: field_project_display_mode
    • field_value: 2
    • field_empty: 0
  • node
    • types
      • project
    • mode: page and form

qa_all_questions

Conditions (Any)

  • views
    • Answers
    • responses:page

search

Conditions (Any)

  • views
    • search

unit_maps

Conditions (Any)

  • node
    • types
      • unit_map
    • mode: page and form

user

Conditions (Any)

  • user_page
    • which page: view
    • which user: other

user_access

Conditions (All)

  • path
    • user/login
    • user/register
    • user
    • user/password
  • user
    • anonymous user

Tag: Context Field Custom (5)

context_field-node-11206

Conditions (Any)

  • context_field
    • 1

context_field-node-11214

Conditions (Any)

  • context_field
    • context_field
    • 1

context_field-node-11220

Conditions (Any)

  • context_field
    • 1

context_field-node-11237

Conditions (Any)

  • context_field
    • 1

context_field-node-11249

Conditions (Any)

  • context_field
    • context_field
    • 1

Tag: Context Field Default (1)

context_field_default_context

Conditions (Any)

  • context_field
    • 1
    • 2

Tag: about us (5)

about_us

Conditions (Any)

  • path
    • about-us
    • about-us/*

contact

Conditions (Any)

  • path
    • contact

media_on_the_move

Conditions (Any)

  • path
    • media-on-the-move

our_mission

Conditions (Any)

  • path
    • about-us

who_we_are

Conditions (Any)

  • path
    • who-we-are
    • interns
    • reporters
    • student-fellows
    • board-directors
    • advisory-council
    • about-us/who-we-are
    • about-us/who-we-are/*

Tag: blog (2)

blog

Conditions (Any)

  • node_taxonomy
    • tids
      • 1473
    • mode: page only
  • taxonomy_term
    • vocabs
      • Blog (vocabulary_11)
    • mode: page only

blog_landing

Conditions (Any)

  • path
    • blog

Tag: education (14)

campus_consortium

Conditions (Any)

  • path
    • campus-consortium

campus_consortium_member

Conditions (Any)

  • node
    • types
      • campus_consortium_member
    • mode: page only

education

Conditions (Any)

  • node_taxonomy
    • tids
      • 1471
    • mode: page only
  • path
    • global-gateway

education_landing

Conditions (Any)

  • path
    • education

global_gateway

Conditions (Any)

  • path
    • global-gateway

lesson_plan

Conditions (Any)

  • node_taxonomy
    • tids
      • 1476
    • mode: page only

lesson_plans_landing

Conditions (Any)

  • path
    • education/lesson-plans

meet_the_journalist

Conditions (Any)

  • node_taxonomy
    • tids
      • 1478
    • mode: page and form

meet_the_journalists_landing

Conditions (Any)

  • path
    • education/meet-journalists

search_by_subject_landing

Conditions (Any)

  • path
    • education/subjects

student_reporting

Conditions (Any)

  • node_taxonomy
    • tids
      • 1479
    • mode: page only

student_reporting_landing

Conditions (Any)

  • path
    • education/student-reporting

student_voices

Conditions (Any)

  • node_taxonomy
    • tids
      • 1477
    • mode: page only

student_voices_landing

Conditions (Any)

  • path
    • education/student-voices

Tag: features (3)

feature

Conditions (Any)

  • path
    • features/*
    • features

voices_haiti

Conditions (Any)

  • path
    • features/voices-haiti/*

voices_haiti_home

Conditions (Any)

  • path
    • features/voices-haiti

Tag: gateways (18)

downstream

Conditions (Any)

  • path
    • downstream
    • node/7900/gateway/all
    • node/7900/gateway/news
    • node/7900/gateway/events
    • node/7900/gateway/search
    • node/7900/gateway/projects
    • node/7900/gateway/education
    • node/7900/gateway/your-stories

dying_for_life

Conditions (Any)

  • path
    • dying-life
    • node/8066/gateway/all
    • node/8066/gateway/news
    • node/8066/gateway/events
    • node/8066/gateway/search
    • node/8066/gateway/projects
    • node/8066/gateway/education
    • node/8066/gateway/your-stories

food_insecurity

Conditions (Any)

  • path
    • food-insecurity
    • node/8067/gateway/all
    • node/8067/gateway/news
    • node/8067/gateway/events
    • node/8067/gateway/search
    • node/8067/gateway/projects
    • node/8067/gateway/education
    • node/8067/gateway/your-stories

fragile_states

Conditions (Any)

  • path
    • fragile-states
    • node/8068/gateway/all
    • node/8068/gateway/news
    • node/8068/gateway/events
    • node/8068/gateway/search
    • node/8068/gateway/projects
    • node/8068/gateway/education
    • node/8068/gateway/your-stories

gateway

Conditions (Any)

  • node
    • types
      • gateway
    • mode: page only
  • views
    • gateway:page_1
    • gateway:page_3
    • gateway:page_4
    • gateway:page_5
    • gateway:page_7
    • gateway:page_8

gateway_education

Conditions (Any)

  • views
    • gateway:page_6

gateway_home

Conditions (Any)

  • node
    • types
      • gateway
    • mode: page only

gateways_landing

Conditions (Any)

  • path
    • gateways

global_goods_local_costs

Conditions (Any)

  • path
    • global-goods-local-costs
    • node/10371/gateway/all
    • node/10371/gateway/news
    • node/10371/gateway/events
    • node/10371/gateway/search
    • node/10371/gateway/projects
    • node/10371/gateway/education
    • node/10371/gateway/your-stories

going_nuclear

Conditions (Any)

  • path
    • going-nuclear
    • node/11063/gateway/all
    • node/11063/gateway/news
    • node/11063/gateway/events
    • node/11063/gateway/search
    • node/11063/gateway/projects
    • node/11063/gateway/education
    • node/11063/gateway/your-stories

haiti_after_the_quake

Conditions (Any)

  • path
    • haiti-after-quake
    • node/9144/gateway/all
    • node/9144/gateway/news
    • node/9144/gateway/events
    • node/9144/gateway/search
    • node/9144/gateway/projects
    • node/9144/gateway/education
    • node/9144/gateway/your-stories

heat_of_the_moment

Conditions (Any)

  • path
    • heat-moment
    • node/8069/gateway/all
    • node/8069/gateway/news
    • node/8069/gateway/events
    • node/8069/gateway/search
    • node/8069/gateway/projects
    • node/8069/gateway/education
    • node/8069/gateway/your-stories

hivaids_in_the_caribbean

Conditions (Any)

  • path
    • hivaids-caribbean
    • node/8070/gateway/all
    • node/8070/gateway/news
    • node/8070/gateway/events
    • node/8070/gateway/search
    • node/8070/gateway/projects
    • node/8070/gateway/education
    • node/8070/gateway/your-stories

ocean_health

Conditions (Any)

  • path
    • oceans
    • node/11340/gateway/all
    • node/11340/gateway/news
    • node/11340/gateway/events
    • node/11340/gateway/search
    • node/11340/gateway/projects
    • node/11340/gateway/education
    • node/11340/gateway/your-stories

population

Conditions (Any)

  • path
    • population
    • node/9509/gateway/all
    • node/9509/gateway/news
    • node/9509/gateway/events
    • node/9509/gateway/search
    • node/9509/gateway/projects
    • node/9509/gateway/education
    • node/9509/gateway/your-stories

religion_and_power

Conditions (Any)

  • path
    • religion-and-power
    • node/14877/gateway/all
    • node/14877/gateway/news
    • node/14877/gateway/events
    • node/14877/gateway/search
    • node/14877/gateway/projects
    • node/14877/gateway/education
    • node/14877/gateway/your-stories

water_west_africa

Conditions (Any)

  • path
    • waiting-for-water
    • node/10552/gateway/all
    • node/10552/gateway/news
    • node/10552/gateway/events
    • node/10552/gateway/search
    • node/10552/gateway/projects
    • node/10552/gateway/education
    • node/10552/gateway/your-stories

women_children_crisis

Conditions (Any)

  • path
    • women-children-crisis
    • node/7902/gateway/all
    • node/7902/gateway/news
    • node/7902/gateway/events
    • node/7902/gateway/search
    • node/7902/gateway/projects
    • node/7902/gateway/education
    • node/7902/gateway/your-stories

Tag: grants (1)

grants

Conditions (Any)

  • path
    • grants
    • grants/*
    • call-for-reporting-proposals-on-water-sanitation-west-african-journalists

Tag: join us (8)

contests_landing

Conditions (Any)

  • path
    • contests

donate

Conditions (Any)

  • path
    • donate
    • donate-persephone-miel-fellowship

event

Conditions (Any)

  • node
    • types
      • event
    • mode: page and form

events_landing

Conditions (Any)

  • path
    • events

internships

Conditions (Any)

  • path
    • join-us/internships
    • join-us/internships/*

jobs

Conditions (Any)

  • path
    • join-us/jobs
    • join-us/jobs/*

join_us_landing

Conditions (Any)

  • path
    • join-us

request_event

Conditions (Any)

  • path
    • request-pulitzer-center-journalist-visit

Tag: lesson builder (1)

lesson_builder_landing

Conditions (Any)

  • path
    • lesson-builder

Tag: projects (8)

project

Conditions (All)

  • entity_field
    • entity_type
      • node
    • field_name: field_project_display_mode
    • field_value: 1
    • field_empty: 1
  • node
    • types
      • project
    • mode: page only

project_education

Conditions (Any)

  • views
    • projects:page_5

project_events

Conditions (Any)

  • views
    • projects:page_4

project_home

Conditions (All)

  • entity_field
    • entity_type
      • node
    • field_name: field_project_display_mode
    • field_value: 1
    • field_empty: 1
  • node
    • types
      • project
    • mode: page only

project_news

Conditions (Any)

  • views
    • projects:page_3

project_reporting

Conditions (Any)

  • views
    • projects:page_1

project_search

Conditions (Any)

  • views
    • projects:page_2

projects_landing

Conditions (Any)

  • path
    • projects

Tag: reporting (7)

published_and_broadcast_landing

Conditions (Any)

  • path
    • published-and-broadcast

reporting

Conditions (Any)

  • node_taxonomy
    • tids
      • 1470
    • mode: page only
  • path
    • reporting/*

reporting_author_block

Conditions (All)

  • node
    • types
      • post
    • mode: page and form
  • node_taxonomy
    • tids
      • 1470
    • mode: page only

reporting_landing

Conditions (Any)

  • path
    • reporting

reporting_landing_new_api

Conditions (Any)

  • path
    • reporting

untold_stories_landing

Conditions (Any)

  • path
    • untold-stories

your_story

Conditions (Any)

  • node
    • types
      • your_story
    • mode: page only

Tag: taxonomy (7)

term_blog

Conditions (Any)

  • taxonomy_term
    • vocabs
      • Blog (vocabulary_11)
    • mode: page only

term_country

Conditions (Any)

  • taxonomy_term
    • vocabs
      • Country (vocabulary_12)
    • mode: page and form

term_media

Conditions (Any)

  • taxonomy_term
    • vocabs
      • Media (media)
    • mode: page and form

term_publication

Conditions (Any)

  • path
    • publications/*

term_region

Conditions (Any)

  • taxonomy_term
    • vocabs
      • Region (vocabulary_3)
    • mode: page and form

term_subject

Conditions (Any)

  • taxonomy_term
    • vocabs
      • Subjects (vocabulary_19)
    • mode: page and form

term_topic

Conditions (Any)

  • taxonomy_term
    • vocabs
      • Topics (vocabulary_6)
    • mode: page and form

Entities

Node

Post (post)

  • Blog (taxonomy_vocabulary_11)—Term reference
  • Region (taxonomy_vocabulary_3)—Term reference
  • Country (taxonomy_vocabulary_12)—Term reference
  • Topics (taxonomy_vocabulary_6)—Term reference
  • Education (taxonomy_vocabulary_15)—Term reference
  • Publications (taxonomy_vocabulary_13)—Term reference
  • Subjects (taxonomy_vocabulary_19)—Term reference
  • Features (taxonomy_vocabulary_20)—Term reference
  • Body (body)—Long text and summary
  • File attachments (upload)—File
  • Images (field_image)—Image
  • Gateway (field_gateway)—Node reference
  • People (field_authors)—User reference
  • Project (field_project)—Node reference
  • External URL (field_publication_link)—Long text
  • Transcript (field_transcript)—Long text
  • This story (field_this_story)—Node reference
  • Tom approved (field_edited)—Boolean
  • SEO approved (field_seo_approved)—Boolean
  • Audio (field_audio)—File
  • Video (field_video)—Multimedia asset (deprecated)
  • Section (field_section)—Term reference
  • Byline (field_byline)—Long text
  • Education (field_vocab_education)—Term reference
  • Embed code (field_soundslides_url)—Long text
  • Media (field_vocab_media)—Term reference
  • Consortium member (field_campus_consortium)—Node reference
  • Word document (field_content_file)—File
  • Assigned (field_assigned)—User reference
  • Has this content already been published or broadcast online? (field_question)—Boolean
  • Teaser (field_teaser)—Long text
  • Log message (field_log)—Long text
  • Published date (field_published_date)—Date
  • Feature (field_feature)—Boolean
  • On hold (field_on_hold)—Boolean
  • Hide status (field_hide_status)—Boolean

Campus Consortium member (campus_consortium_member)

  • Body (body)—Long text and summary
  • Student fellows (field_authors)—User reference
  • Logo (field_consortium_member_logo)—Image
  • Member status (field_member_status)—List (text)
  • Published date (field_published_date)—Date

Event (event)

  • Country (taxonomy_vocabulary_12)—Term reference
  • Education (taxonomy_vocabulary_15)—Term reference
  • Cities (taxonomy_vocabulary_17)—Term reference
  • Institutions (taxonomy_vocabulary_18)—Term reference
  • Body (body)—Long text and summary
  • File attachments (upload)—File
  • Image(s) (field_image)—Image
  • Gateway (field_gateway)—Node reference
  • Project (field_project)—Node reference
  • Assigned (field_assigned)—User reference
  • Tom approved (field_edited)—Boolean
  • SEO approved (field_seo_approved)—Boolean
  • Event date (field_event_date)—Date (ISO format)
  • Participants (field_authors)—User reference
  • Consortium member (field_campus_consortium)—Node reference
  • Embed media (field_soundslides_url)—Long text
  • Log message (field_log)—Long text
  • Published date (field_published_date)—Date
  • On hold (field_on_hold)—Boolean
  • Feature (field_feature)—Boolean

Feature (feature)

  • Region (taxonomy_vocabulary_3)—Term reference
  • Country (taxonomy_vocabulary_12)—Term reference
  • Topics (taxonomy_vocabulary_6)—Term reference
  • Body (body)—Long text and summary
  • Image(s) (field_image)—Image
  • Project (field_project)—Node reference
  • Visibile in projects list (field_display)—Boolean
  • Gateway (field_gateway)—Node reference

Feed (feed)

Feed item (feed_item)

  • Description (field_feed_item_description)—Long text and summary

Front page (front_page)

  • Image(s) (field_image)—Image
  • Body (body)—Long text and summary
  • Destination URL (field_destination_url)—Text

Gateway (gateway)

  • Region (taxonomy_vocabulary_3)—Term reference
  • Country (taxonomy_vocabulary_12)—Term reference
  • Topics (taxonomy_vocabulary_6)—Term reference
  • Gateway introduction (body)—Long text and summary
  • File attachments (upload)—File
  • Image(s) (field_image)—Image
  • Video (field_video)—Multimedia asset (deprecated)
  • Education description (field_education_description)—Long text and summary
  • Gateway icon (field_gateway_icon)—Image
  • Published date (field_published_date)—Date
  • Assigned (field_assigned)—User reference
  • Log message (field_log)—Long text
  • Background Image (field_background_image)—Image
  • Header Image (field_header_image)—Image
  • Background Color (field_background_color)—Text
  • Link Color (field_link_color)—Text
  • Section (field_section)—Term reference

Lessons (lessons)

  • Introduction and Narrative (body)—Long text and summary
  • Class Name/Number (field_class_name_number)—Text
  • Institution Name (field_institution_name)—Text
  • Resources (field_resources)—Node reference
  • Lesson Questions (field_lesson_questions)—Long text
  • Model Lesson (field_is_model_lesson)—Boolean
  • Image(s) (field_image)—Image
  • Feature (field_feature)—Boolean
  • Finished (field_finished)—Boolean
  • Public (field_public)—Boolean
  • View Count (field_view_count)—Float
  • Grade Level (field_grade_level)—Term reference
  • Educator Notes (field_educator_notes)—Long text
  • Adapted From Lesson (field_adapted_from_lesson)—Node reference

Page (page)

  • Body (body)—Long text and summary
  • File attachments (upload)—File
  • Image(s) (field_image)—Image
  • Video (field_video)—Multimedia asset (deprecated)

Project (project)

  • Region (taxonomy_vocabulary_3)—Term reference
  • Country (taxonomy_vocabulary_12)—Term reference
  • Topics (taxonomy_vocabulary_6)—Term reference
  • Subjects (taxonomy_vocabulary_19)—Term reference
  • Features (taxonomy_vocabulary_20)—Term reference
  • Banner (field_banner)—Long text
  • Project description (body)—Long text and summary
  • File attachments (upload)—File
  • Image(s) (field_image)—Image
  • Author(s) (field_authors)—User reference
  • Education description (field_education_description)—Long text and summary
  • On hold (field_on_hold)—Boolean
  • Gateway (field_gateway)—Node reference
  • Contest (field_contest)—Boolean
  • Not visible in Projects list (field_display)—Boolean
  • Tom approved (field_edited)—Boolean
  • SEO approved (field_seo_approved)—Boolean
  • Consortium member (field_campus_consortium)—Node reference
  • Assigned (field_assigned)—User reference
  • Log message (field_log)—Long text
  • Project context (field_project_context)—Context
  • Published date (field_published_date)—Date
  • Display mode (field_project_display_mode)—List (integer)
  • Social medla links (field_social_medla_links)—Long text
  • Hide status (field_hide_status)—Boolean
  • Section (field_section)—Term reference

Q&A (qa)

  • Body (body)—Long text and summary
  • File attachments (upload)—File
  • Image(s) (field_image)—Image
  • Reporter (field_authors)—User reference
  • Project (field_project)—Node reference
  • Feature (field_feature)—Boolean
  • Project context (field_project_context)—Context

Response (question)

  • Answered by (field_answered_by)—User reference
  • Featured (field_featured)—Boolean
  • Answer (field_qa_answer)—Long text
  • Email address (field_qa_email)—Text
  • Text (field_qa_question)—Long text
  • Q&A (field_qa_ref)—Node reference
  • Your school or organization (field_qa_school)—Text
  • Your first name (field_your_first_name)—Text

Spotlight (spotlight)

  • Body (body)—Long text and summary
  • Image(s) (field_image)—Image
  • Project (field_project)—Node reference
  • People (field_authors)—User reference
  • Gateway (field_gateway)—Node reference
  • Published date (field_published_date)—Date
  • Format (field_format)—List (text)
  • Assigned (field_assigned)—User reference
  • Log message (field_log)—Long text
  • Section (field_spotlight_section)—List (float)

Unit map (unit_map)

  • Introduction (body)—Long text and summary
  • Gateways (field_gateway)—Node reference
  • Image (field_image)—Image
  • Projects (field_project)—Node reference
  • Learning Plan & Activities (field_unit_activities)—Long text
  • Assessments (field_unit_assessments)—Long text
  • Content (field_unit_content)—Long text
  • Content (field_unit_content_ref)—Node reference
  • Big Ideas / Enduring Understandings (field_unit_ideas)—Long text
  • Essential Questions (field_unit_questions)—Long text
  • Resources (field_unit_resources)—Long text
  • Skills / Strategies (field_unit_skills)—Long text
  • Common Core Standards (field_unit_standards)—Long text
  • Key terms / Vocabulary (field_unit_vocab)—Long text
  • Feature (field_feature)—Boolean
  • Published date (field_published_date)—Date

Webform (webform)

  • Body (body)—Long text and summary

Your Story (your_story)

  • Body (body)—Long text and summary
  • File attachments (upload)—File
  • Video (field_video)—Multimedia asset (deprecated)
  • Gateway (field_gateway)—Node reference
  • Images (field_image)—Image

Taxonomy term

Region (vocabulary_3)

Topics (vocabulary_6)

Blog (vocabulary_11)

Country (vocabulary_12)

Publications (vocabulary_13)

  • Publication logo (field_publication_logo)—Image

Education programs (vocabulary_15)

Tags (vocabulary_16)

Cities (vocabulary_17)

Institutions (vocabulary_18)

Subjects (vocabulary_19)

Features (vocabulary_20)

Section (section)

Fragile States (fragile_states)

Education (education)

Media (media)

  • Media icon (field_media_icon)—Image

New blog categories (new_blog_categories)

Theme (theme)

Builder Grade Level (builder_grade_level)

States (states)

Brookings Institution | Order From Chaos (brookings_institution_order_from_chaos)

User

user (user)

  • About (field_about)—Long text and summary
  • First name (field_first_name)—Text
  • Last name (field_last_name)—Text
  • Title (field_user_title)—Text
  • Display name (field_display_name)—Text
  • Priority (field_priority)—Text
  • Lesson Count (field_lesson_count)—Integer
  • Prevent public access to this profile (field_prevent_access)—Boolean
  • Fellowship Year (field_fellowship_year)—Date
  • City (field_city)—Text
  • Created By Builder (field_created_by_builder)—Boolean
  • Organization/School (field_organization_school)—Text
  • Professional Title (field_professional_title)—Text
  • About User (field_about_user)—Long text
  • Facebook (field_facebook)—Link
  • LinkedIn (field_linkedin)—Link
  • Pintrest (field_pintrest)—Link
  • Twitter (field_twitter)—Link
  • website (field_website)—Link
  • website school org (field_website_school_org)—Link
  • State (field_state)—Term reference
<?php
function _context_form_option($v) {
$o = array(
'page only',
'page and form',
'form only',
);
return "*mode*: {$o[$v]}";
}
function li($v, $i = 0) {
$indent = str_repeat(' ', $i);
echo "$indent- $v\n";
}
echo "# Contexts\n\n";
$contexts_by_tag = array();
foreach (context_load() as $context_name => $context) {
if (!isset($contexts_by_tag[$context->tag])) {
$contexts_by_tag[$context->tag] = array();
}
$contexts_by_tag[$context->tag][$context->name] = $context;
}
ksort($contexts_by_tag);
foreach ($contexts_by_tag as $tag => $contexts) {
ksort($contexts);
if (empty($tag)) {
$tag = 'NONE';
}
$count = count($contexts);
echo "## Tag: $tag ($count)\n\n";
foreach ($contexts as $context_name => $context) {
echo "### $context_name\n\n";
$condition_mode = $context->condition_mode ? 'All' : 'Any';
echo "#### Conditions ($condition_mode)\n";
foreach ($context->conditions as $condition_type => $condition) {
li("**$condition_type**");
switch ($condition_type) {
case 'path':
foreach ($condition['values'] as $path) {
li("`$path`", 1);
}
break;
case 'node':
li('*types*', 1);
foreach ($condition['values'] as $node_type) {
li("`$node_type`", 2);
}
li(_context_form_option($condition['options']['node_form']), 1);
break;
case 'node_taxonomy':
li('*tids*', 1);
foreach ($condition['values'] as $node_type) {
li("`$node_type`", 2);
}
li(_context_form_option($condition['options']['node_form']), 1);
break;
case 'user_page':
$which_page = implode(', ', $condition['values']);
li("*which page*: $which_page", 1);
li("*which user*: {$condition['options']['mode']}", 1);
break;
case 'entity_field':
foreach ($condition['values'] as $value_name => $value) {
$unz = unserialize($value);
if (is_array($unz)) {
li("*$value_name*", 1);
foreach ($unz as $u) {
if ($u) {
li($u, 2);
}
}
}
else {
li("*$value_name*: $value", 1);
}
}
break;
case 'user':
case 'views':
case 'context_field':
foreach ($condition['values'] as $value) {
li($value, 1);
}
break;
case 'taxonomy_term':
li('*vocabs*', 1);
foreach ($condition['values'] as $vm) {
$vocab = taxonomy_vocabulary_machine_name_load($vm);
li("$vocab->name (`$vm`)", 2);
}
li(_context_form_option($condition['options']['term_form']), 1);
break;
default:
print_r($condition);
break;
}
}
echo "\n";
}
echo "\n";
}
echo "# Entities\n\n";
foreach (field_info_instances() as $entity_type => $bundles) {
$entities_i_care_about = array(
'node',
'taxonomy_term',
'user',
);
if (in_array($entity_type, $entities_i_care_about)) {
$entity_info = entity_get_info($entity_type);
echo "## {$entity_info['label']}\n\n";
foreach ($bundles as $bundle => $field_instances) {
switch ($entity_type) {
case 'node':
$type = node_type_load($bundle);
if ($type->name) {
$name = $type->name;
}
break;
case 'taxonomy_term':
$vocab = taxonomy_vocabulary_machine_name_load($bundle);
$name = $vocab->name;
break;
default:
$name = $bundle;
break;
}
if (isset($name)) {
echo "### $name (`$bundle`)\n";
// print_r(field_group_read_groups(array('entity_type' => $entity_type, 'bundle' => $bundle)));
// $field_groups = field_group_read_groups(array('entity_type' => $entity_type, 'bundle' => $bundle));
foreach ($field_instances as $field_name => $instance) {
$field_info = field_info_field($field_name);
$field_type = $field_info['type'];
$field_type_info = field_info_field_types($field_type);
echo "- {$instance['label']} (`$field_name`)&mdash;{$field_type_info['label']}\n";
}
echo "\n";
unset($name);
}
}
echo "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment