19 require_once(BASE.
"wcmf/application/controller/class.BatchController.php");
20 require_once(BASE.
"wcmf/lib/persistence/class.PersistenceFacade.php");
21 require_once(BASE.
"wcmf/lib/presentation/class.WCMFInifileParser.php");
22 require_once(BASE.
"wcmf/lib/util/class.URIUtil.php");
98 if ($request->getAction() !=
'preview')
101 parent::initialize($request, $response);
109 if ($this->_request->getAction() !=
'preview')
112 return parent::executeKernel();
131 if ($this->_request->getAction() ==
'preview')
133 $previewItem = $this->_request->getValue(
'oid');
136 if (!method_exists($this, $callback))
137 WCMFException::throwEx(
"Method ".$callback.
" must be implemented by ".get_class($this), __FILE__, __LINE__);
139 call_user_method($callback, &$this, array($previewItem));
142 parent::processPart();
152 WCMFException::throwEx(
"getPreviewCallback() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
169 $isPreview = ($this->_request->getAction() ==
'preview');
175 if ($outputView != null)
179 if (!is_dir($exportDir))
181 $outputView->assign($this->FILENAME_VARNAME, realpath($exportDir).
'/'.$filename);
185 $refURL = UriUtil::getProtocolStr().$_SERVER[
'HTTP_HOST'].$_SERVER[
'SCRIPT_NAME'];
187 $outputView->assign(
'baseHref', $baseHref);
201 $isPreview = ($this->_request->getAction() ==
'preview');
207 $outputView =
new View();
208 $outputView->setup();
214 $outputView = &$this->
getView();
233 if (($exportDir = $parser->getValue(
'exportDir',
'cms')) ===
false)
249 if ($this->_request->getAction() ==
'preview')
261 $isPreview = ($this->_request->getAction() ==
'preview');
269 $actionKey = $parser->getBestActionKey(
'views', $this->_response->getSender(), $context,
'');
270 if (($viewTemplate = BASE.$parser->getValue($actionKey,
'views')) ===
false)
271 WCMFException::throwEx(
"View definition missing for ".$this->_response->getSender().
"?".$context.
".", __FILE__, __LINE__);
274 $view->assign(
'dateStamp', date(
"Y").
"/".date(
"m"));
277 $filename = $view->get_template_vars($this->FILENAME_VARNAME);
278 $path = dirname($filename);
279 if (!file_exists($path))
281 $fp = fopen($filename,
"w");
282 fputs($fp, $view->fetch($viewTemplate));
284 chmod($filename, 0755);
initialize(&$request, &$response)
writeOutput(&$view, $context)
throwEx($message, $file='', $line='')
makeAbsolute($rel_uri, $base, $REMOVE_LEADING_DOTS=true)
initialize(&$request, &$response)
assignViewDefaults(&$view)
getPreviewCallback($context)
& initializeView($filename)
PageExportController is an abstract controller that is used as base class for Controller classes that...
View is used by Controller to handle the view presentation in MVC pattern. View is a subclass of Smar...
assignCommonValues(&$view)
BatchController allows to define work packages that will be processed in a sequence. It simplifies the usage of LongTaskController functionality for splitting different bigger tasks into many smaller (similar) tasks where the whole number of tasks isn't known at designtime.