SlideShare a Scribd company logo
Andrew Bacon ‟13
Carleton College
me:
me:
me:
at WSG:
➡ entities
➡ relationships
entities:
stuff.
entities:
stuff like...
➡ sites ➡ news posts
➡ pages ➡ images, ...
➡ a cat
entities:
aggregations of
properties...
➡ id ➡ name
➡ type ➡ created_on, ...
entities:
some properties only
make sense for
certain types
entities:
some properties only make sense for certain
types, e. g.:
lol_cat boromir
breed
entities:
aggregations of
properties across
database tables.
➡ entity
➡ meta
➡ chunk
➡ newstype, image, ...
Some examples.
meta
➡ description
➡ keywords
chunk
➡ content
➡ author
image
➡ dimension
➡ image_type
newstype
➡ subtitle
➡ on_front_page
Some examples.
meta
➡ description
➡ keywords
chunk
➡ content
➡ author
image
➡ dimension
➡ image_type
newstype
➡ subtitle
➡ on_front_page
news post
Some examples.
meta
➡ description
➡ keywords
chunk
➡ content
➡ author
image
➡ dimension
➡ image_type
newstype
➡ subtitle
➡ on_front_page
image
not entities:
relationships
relationships
Things are related to other
things.
➡ entity_a and entity_b
relationships
silly examples:
nation_to_cat_monarch
relationships
silly examples:
lolrus_to_bukkit
relationships
real examples:
minisite_page_to_av
av_to_av_file
minisite_page_to_image
news_to_image
relationships
Things are related to other
things.
➡ directional
➡ entity_a and entity_b
detour:
relationships have direction.
➡ unidirectional
minisite_page_to_image
detour:
relationships have direction.
nation_to_cat_monarch
(disembodied)
detour:
relationships have direction.
➡ unidirectional
➡ bidirectional
site_to_user
detour:
real examples of directionality
➡ news_to_image
detour:
relationships have direction.
focus
related
news_post_to_...
detour:
relationships have direction.
image_to_... or ..._to_image
focus
related
relationships
Things are related to other
things.
➡ directional
➡ number-sensitive
➡ entity_a and entity_b
relationships
silly examples:
nation_to_cat_monarch
relationships
silly examples:
mom_to_kittens
relationships
real examples:
➡ news_to_image
relationships
Things are related to other
things.
➡ directional
➡ number-sensitive
➡ entity_a and entity_b
➡ pretty darn arbitrary
entities:
stuff like...
➡ sites ➡ news posts
➡ pages ➡ images, ...
➡ types?
➡ DB tables?!
➡ „type‟!?!?
putting it together
type_to_table relationships for
entity 3, “Site.”
rel_id entity_a entity_b rel_type
7 Site (3) site (8) 1
11628 Site (3) meta (82) 1
94766 Site (3)
ldap_cache
(37716)
1
entities in PHP
➡ objects of class Entity
➡ linked to corresponding entity
in DB (if exists)
entities in PHP
methods to know about
get_value($name, $value);
set_value($name);
id();
getting entities
entity constructor
entity selectors
the constructor
$e = new Entity($id);
the selector
$es =
new Entity_Selector($site);
selector
why I was afraid
➡ no formal introduction
selector
common tasks
What properties of entities can we select
based on?
➡ Type
➡ Relationship to a specific entity
➡ Has a property with a specific value
➡ ...?
selector
add_type($id);
Will select only entities of the given type.
$es->add_type(id_of(„image‟));
selector
add_relation($where);
Selects only entities where a specific
property meets some condition.
$es->add_relation(
„status.status != “pending”‟
);
selector
add_left_relationship($id[, $rel_id]);
selected entities must exist on the left side
of a relationship with $entity_id on the right
side. Optional $relationship_id.
“get the parent of the
given entity.”
selector
add_right_relationship($id[, $rel_id])
selected entities must exist on the right side
of a relationship with $entity_id on the left
side. Optional $relationship_id.
“get the child of the given
entity.”
selector
set_env(
„site‟, $site_id
);
always set this.
not the same thing as the site id you set in
the $es constructor.
selector
run_one([$type, $status, $error]);
Run the darn thing!
Returns an array of entities.
selector
an example:
Select all media works from a site
➡$es = new Entity_Selector($site);
➡$es->add_type(id_of(„av‟));
➡$result = $es->run_one()
selector
another example:
Select all images related to a news item (for
this site!)
➡$es = new Entity_Selector($site);
➡$es->add_type(id_of(„image‟));
➡$es->add_right_relationship(
$news_id,
relationship[_id_of(„news_to_image‟)
);
➡$result = $es->run_one()
selector
add_left_relationship_field(
$rel_name, $table, $field
);
If there are entities that are on the left side
of the given relationship, add the given
field.
selector
how to look up info about a type
Master admin -> types
Select This! Entity Selectors in Reason CMS
more?!
you know enough now.
other thoughts
that guy sitting next to you is
AMAZING with $es.
➡ bigger selectors are not better.
➡ limit_tables, limit_fields
➡ fifth parameter of add_left_rel_field
➡ google group: reason-cms
goodies!!!!
available at
go.carleton.edu/...
slides! cheat sheet!
!?!?

More Related Content

PDF
Difference between $get and $find in jquery
PDF
위즈돔 + 스쿨
PPTX
Making of dps
DOCX
A call for change
PPT
Fit4 Business
PPT
Shruti's financial management(presentation)
PPTX
Ext JS 4
PPTX
Bloom's taxonomy
Difference between $get and $find in jquery
위즈돔 + 스쿨
Making of dps
A call for change
Fit4 Business
Shruti's financial management(presentation)
Ext JS 4
Bloom's taxonomy

Viewers also liked (17)

PPTX
Qdoba presentation
PPTX
Initial ideas
PPT
Maserati quattroporte-stainless-steel-exhaust
PPT
Schorn Construction Co Slideshow
PDF
Bumper Duvet cover sets
PDF
Paternal Age Effect and other stories
PPTX
Goodwin's Theory
PPTX
PHL Tourism Industry Performance
PDF
Seminar: 7 Habits And Barrier Of Customer Based Company.Dasmr
PPTX
Energy drink
PPT
Vacuum Verpakt Beter Verleng De Houdbaarheid Van Requirements
PPT
ViatgeFinalCurs
PDF
How to Apply
PPT
Fichardtpark marketing
PPT
JC Penney Integrated Marketing Campaign
PPT
Презентация процесса создания сайтов на Системе IM
Qdoba presentation
Initial ideas
Maserati quattroporte-stainless-steel-exhaust
Schorn Construction Co Slideshow
Bumper Duvet cover sets
Paternal Age Effect and other stories
Goodwin's Theory
PHL Tourism Industry Performance
Seminar: 7 Habits And Barrier Of Customer Based Company.Dasmr
Energy drink
Vacuum Verpakt Beter Verleng De Houdbaarheid Van Requirements
ViatgeFinalCurs
How to Apply
Fichardtpark marketing
JC Penney Integrated Marketing Campaign
Презентация процесса создания сайтов на Системе IM
Ad

Similar to Select This! Entity Selectors in Reason CMS (20)

PDF
Entities 101: Understanding Data Structures in Drupal
PPTX
Introduction to SQL Server Graph DB
PDF
Line,,NATIONAL SEMINAR ORGANIZED BY KULISAA 15.01.2015
PPT
Slides.ppt
PPT
Slides.ppt
PPT
Slides.ppt
PDF
Multi-language Content Discovery Through Entity Driven Search
PDF
Alec Mitchell Relationship Building Defining And Querying Complex Relatio...
PPT
KEY
Preliminary committee presentation
PDF
Multi-language Content Discovery Through Entity Driven Search: Presented by A...
PDF
ознакомления с модулем Entity api
PPTX
Drupal 7 entities & TextbookMadness.com
PPT
Introduction to the Semantic Web
PDF
Entity api
PDF
Understanding the Entity API Module
ODP
Semantic Web - Introduction
PPT
Tutorial
PDF
eZ Publish nextgen
Entities 101: Understanding Data Structures in Drupal
Introduction to SQL Server Graph DB
Line,,NATIONAL SEMINAR ORGANIZED BY KULISAA 15.01.2015
Slides.ppt
Slides.ppt
Slides.ppt
Multi-language Content Discovery Through Entity Driven Search
Alec Mitchell Relationship Building Defining And Querying Complex Relatio...
Preliminary committee presentation
Multi-language Content Discovery Through Entity Driven Search: Presented by A...
ознакомления с модулем Entity api
Drupal 7 entities & TextbookMadness.com
Introduction to the Semantic Web
Entity api
Understanding the Entity API Module
Semantic Web - Introduction
Tutorial
eZ Publish nextgen
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
KodekX | Application Modernization Development
PPTX
Spectroscopy.pptx food analysis technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Programs and apps: productivity, graphics, security and other tools
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
Spectroscopy.pptx food analysis technology
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
MIND Revenue Release Quarter 2 2025 Press Release
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx

Select This! Entity Selectors in Reason CMS