Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Inside the core: content classes, workflows, notifications, information collection, search

A map of the kernel classes behind the concepts of the earlier chapters: content classes and objects, workflows and triggers, notifications, information collection and search, with where each lives now.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/book-learning/inside-the-core-classes-and-services.md

On this page

Inside the core: content classes, workflows, notifications, information collection, search

The second half of the book's chapter 4 shows how the concepts map to kernel classes. The names are still the names.

ConceptKernel classes (in kernel/classes)Notes
Content classeZContentClass, eZContentClassAttributeA class has attributes; each attribute has a datatype string and the data fields (data_int1..data_text5) the datatype uses for its settings.
Content objecteZContentObject, eZContentObjectVersion, eZContentObjectAttributeAn object has versions; each version has attributes; the attribute's value is stored by its datatype.
Node treeeZContentObjectTreeNodeA node; also the place all the tree fetches are written.
Workflows and triggerseZWorkflow, eZWorkflowEvent, eZWorkflowProcess, workflow event types in kernel/classes/workflowtypesAn operation (such as publish) asks the workflow system whether a trigger has a workflow; the process keeps its state until done.
Notificationskernel/classes/notificationEvents are collected, handlers turn them into mails, a cronjob sends them (Notifications for developers).
Information collectioneZInformationCollection and its attributesThe data a visitor sends to an information collector object.
SearcheZSearch and the engine in kernel/search/plugins (the default ezsearchengine)Words are indexed when an object is published; other engines (Solr through ezfind) plug in the same way.

Creating an object in code

The book builds an object by hand from a class, a version and attributes. That is how the model works inside, and the classes above are the parts: eZContentClass::fetchByIdentifier() gives the class, instantiate() makes the object with its first draft, the attributes hold the values, and publishing goes through the content operation so that workflows run. You rarely write those steps yourself any more. eZContentFunctions::createAndPublishObject() does all of them in one call, and updateAndPublishObject() changes an object the same way. The page Creating and updating content in code has the tested examples, the value format for each datatype, and idempotent imports. To run a script, see CLI scripts and console commands.

Information collection: the settings

The collector is set up in collect.ini. Three types ship (poll, form, feedback), chosen by default with [InfoSettings] Type=form, or per object by an attribute (TypeAttribute=collection_type). The main settings, each with a ...List[<type>] form for one type and an ...Attribute form that lets an attribute of the object decide:

SettingMeaning
[CollectionSettings] CollectAnonymousDatawhether visitors who are not logged in may submit
[CollectionSettings] CollectionUserDatamultiple (many submissions per user), unique (one; a second gets a warning), overwrite (one; a new one replaces the old)
[EmailSettings] SendEmailwhether a collected item is also mailed
[DisplaySettings] Display, RedirectURLwhat the visitor sees after sending, and where to go

A logged-in user is tracked by user ID, an anonymous one by the remote IP address. The shipped values make poll allow anonymous data and one submission per user. Collected data is read in the administration (Collected information).

Next: Extending: why, where and how.

Source and license

Adapted from chapter 4, "A Glimpse Inside the Core", of Learning eZ publish: Building Content Management Solutions by Paul Borgermans, Tony Wood, Paul Forsyth, Martin Bauer, Björn Dieding and Ben Pirt (additional material by Bruce Morrison), second edition, 2024, Book-Learning-eZPublish. Copyright (c) 2004-2024 7x and Graham Brookins. Licensed under the GNU Free Documentation License, version 1.3 or any later version, with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts (the license). Changes: shortened; PHP 4 code replaced by current calls; class names, settings and constants checked against Exponential 6.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x