wCMF
3.6
|
Public Attributes | |
$FILENAME_VARNAME = 'PageExportController.filename' | |
Public Attributes inherited from BatchController | |
$WORK_PACKAGES_VARNAME = 'BatchController.workPackages' | |
$NUM_STEPS_VARNAME = 'BatchController.numSteps' | |
$_workPackages = array() | |
Public Attributes inherited from LongTaskController | |
$STEP_SESSION_VARNAME = 'LongTaskController.curStep' | |
$ONE_CALL_SESSION_VARNAME = 'LongTaskController.oneCall' | |
$_curStep = 1 | |
Public Attributes inherited from Controller | |
$_request = null | |
$_response = null | |
$_errorMsg = '' | |
$_view = null | |
$_delegate = null | |
PageExportController is an abstract controller that is used as base class for Controller classes that export content to pages defined by templates. Export is triggered by any action except 'preview' and 'continue'. On 'preview' action PageExportController creates a preview corresponding to a given oid and context.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
To do this, subclasses define several work packages (see BatchController::getWorkPackage()). The callback functions may call base class methods to fulfill their tasks.
An example callback could look like this:
The corresponding configuration would look like this:
Input actions:
Output actions:
[in] | oid | The object id of the object to display in preview mode |
Definition at line 86 of file class.PageExportController.php.
PageExportController::initialize | ( | & | $request, |
& | $response | ||
) |
Definition at line 94 of file class.PageExportController.php.
References Controller\initialize().
PageExportController::executeKernel | ( | ) |
Definition at line 107 of file class.PageExportController.php.
References processPart().
PageExportController::processPart | ( | ) |
If the given action is 'preview', this method calls - depending on the context - the preview callback method defined by the subclass (
Definition at line 128 of file class.PageExportController.php.
References getPreviewCallback(), and WCMFException\throwEx().
Referenced by executeKernel().
PageExportController::getPreviewCallback | ( | $context | ) |
Get the preview callback method for a given context. This method must have the same signature as one of the callbacks passed to BatchController::addWorkPackage(). The oid array passed as argument to that method will only hold the oid passed as 'oid' parameter to the view.
Definition at line 150 of file class.PageExportController.php.
References WCMFException\throwEx().
Referenced by processPart().
& PageExportController::initializeView | ( | $filename | ) |
HELPER FUNCTIONS Create and initialize the view. This is the main entrance to view generation. After creation this method calls the PageExportController::assignCommonValues() method, that subclasses may implement to assign common vallues to their views (such as page title).
filename | The filename of the exported page (relative to exportDir as provided by by getExportDir()), this value is even required for a preview to set the baseHref properly |
Definition at line 167 of file class.PageExportController.php.
References assignCommonValues(), createOutputView(), getExportDir(), URIUtil\makeAbsolute(), and useBaseHref().
& PageExportController::createOutputView | ( | ) |
Actually create the view for output.
Definition at line 199 of file class.PageExportController.php.
References Controller\assignViewDefaults(), and Controller\getView().
Referenced by initializeView().
PageExportController::assignCommonValues | ( | & | $view | ) |
Assign common values to the export view. This method is called when the view is initialized.
view | A reference to the view to assign the values to |
Definition at line 223 of file class.PageExportController.php.
Referenced by initializeView().
PageExportController::getExportDir | ( | ) |
Get the directory where the exported files should be placed. The default implementation gets the directory from the key 'exportDir' in the config section 'cms'
Definition at line 230 of file class.PageExportController.php.
References InifileParser\getInstance(), and WCMFException\throwEx().
Referenced by initializeView().
PageExportController::useBaseHref | ( | ) |
Determine if a baseHref should be used in the html output. The baseHref metatag allows to interpret all resource paths used in the html code to be relative to the baseHref value. If you want to prevent this return false in this method. The default implementation returns true if the action is preview, else false
Definition at line 245 of file class.PageExportController.php.
Referenced by initializeView().
PageExportController::writeOutput | ( | & | $view, |
$context | |||
) |
Write the view content to a file.
view | A reference to the view to write |
context | The context of the view template definition in the configuration file |
Definition at line 259 of file class.PageExportController.php.
References WCMFInifileParser\getInstance(), and WCMFException\throwEx().
PageExportController::$FILENAME_VARNAME = 'PageExportController.filename' |
Definition at line 89 of file class.PageExportController.php.