Page HTMLPage AdministrationPage contentPublish

public class contentPublish extends AdministrationPage

content.publish.php #17

The Publish page is where the majority of an Authors time will be spent in Symphony with adding, editing and removing entries from Sections. This Page controls the entries table as well as the Entry creation screens.

Properties

mixed $_errors

Methods

void __actionEdit(string $context, Section $section, Entry $entry, array $fields)

Just prior to rendering of an Entry edit form.

Parameters
  • $context string'/publish/edit/'

void __actionIndex(string $context, array $options)

Allows an extension to modify the existing options for this page's With Selected menu. If the $options parameter is an empty array, the 'With Selected' menu will not be rendered.

Parameters
  • $context string'/publish/'

  • $options arrayAn array of arrays, where each child array represents an option in the With Selected menu. Options should follow the same format expected by Widget::__SelectBuildOption. Passed by reference.

void __actionNew()
void __switchboard(str $type)

The __switchboard function acts as a controller to display content based off the $type. By default, the $type is 'view' but it can be set also set to 'action'. The $type is prepended by __ and the context is append to the $type to create the name of the function that will provide that logic. For example, if the $type was action and the context of the current page was new, the resulting function to be called would be named __actionNew(). If an action function is not provided by the Page, this function returns nothing, however if a view function is not provided, a 404 page will be returned.

Parameters
  • $type strEither 'view' or 'action', by default this will be 'view'

void __viewEdit(string $context, Section $section, Entry $entry, array $fields)

Creation of an Entry. New Entry object is provided.

Parameters
  • $context string'/publish/new/'

void __viewIndex()
void __viewNew(string $context, Section $section, Entry $entry, array $fields)

Editing an entry. Entry object is provided.

Parameters
  • $context string'/publish/edit/'

void action()

This function is called when $_REQUEST contains a key of 'action'. Any logic that needs to occur immediately for the action to complete should be contained within this function. By default this calls the __switchboard with the type set to 'action'.

See Also
array findParentRelatedEntries(integer $field_id, integer $entry_id)

Find related entries for the current field. Requires the column names to be entry_id and relation_id as with the Select Box Link

array findRelatedEntries(integer $field_id, integer $entry_id)

Find related entries from a linking field's data table. Requires the column names to be entry_id and relation_id as with the Select Box Link

String isFieldHidden(Field $field)

Check whether a field is a Select Box Link and is hidden

void sort(mixed $sort, mixed $order, mixed $params)
void view()

Called to build the content for the page. This function immediately calls __switchboard() which acts a bit of a controller to show content based on off a type, such as 'view' or 'action'. AdministrationPages can override this function to just display content if they do not need the switchboard functionality

See Also

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details