- Symphony 2.6.2
-
› assets
14 -
› boot
14 -
› core
23 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates92
- Deprecated24
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
Event SectionEvent
public abstract class SectionEvent extends Event
class.event.section.php #14The SectionEvent
class provides methods required to save
data entered on the frontend to a corresponding Symphony section.
Properties
array $filter_errors
An associative array of errors from the filters that have run on this event.
array $filter_results
An associative array of results from the filters that have run on this event.
Methods
XMLElement __doit(XMLElement $result, $position, $entry_id)
$fields,
This function does the bulk of processing the Event, from running the delegates
to validating the data and eventually saving the data into Symphony. The result
of the Event is returned via the $result
parameter.
Parameters
Returns
The result of the Event
string __reduceType(
$a, $b, $a,)
Helper method to determine if a field is missing, or if the data
provided was invalid. Used in conjunction with array_reduce
.
Returns
'missing' or 'invalid'
static XMLElement appendErrors(XMLElement $result, $fields, $errors, $post_values)
Appends errors generated from fields during the execution of an Event
static XMLElement buildFilterElement(
$name, $status, $message, $attributes)
This method will construct XML that represents the result of an Event filter.
Parameters
static XMLElement createError(Field $field, $type, $message)
Given a Field instance, the type of error, and the message, this function
creates an XMLElement node so that it can be added to the ?debug
for the
Event
Parameters
XMLElement|void execute()
This function will process the core Filters, Admin Only and Expect
Multiple, before invoking the __doit
function, which actually
processes the Event. Once the Event has executed, this function will
determine if the user should be redirected to a URL, or to just return
the XML.
Returns
If $_REQUEST{'redirect']
is set, and the Event executed successfully, the user will be redirected to the given location. If $_REQUEST['redirect']
is not set, or the Event encountered errors, an XMLElement of the Event result will be returned.
XMLElement processSendMailFilter(XMLElement $result, $send_email, $fields, Section $section, Entry $entry)
This function handles the Send Mail filter which will send an email to each specified recipient informing them that an Entry has been created.
Parameters
Returns
The modified $result
with the results of the filter.
static string|array replaceFieldToken(
$needle, $haystack, $default, $discard_field_name, $collapse)
This function searches the $haystack
for the given $needle
,
where the needle is a string representation of where the desired
value exists in the $haystack
array. For example fields[name]
would look in the $haystack
for the key of fields
that has the
key name
and return the value.