public function handleError(AgaviRequestDataHolder $request_data) { $view = parent::handleError($request_data); $display_mode = $this->getDisplayMode($request_data); $this->setAttribute('resource_type', $this->getProjectionType()); return ucfirst($display_mode) . $view; }
public function handleWriteError(AgaviRequestDataHolder $request_data) { parent::handleError($request_data); $resource = $request_data->getParameter('resource'); $task_service = $this->getServiceLocator()->getTaskService(); if ($task_service->hasTaskConflicts()) { $task_conflict = $task_service->getLastTaskConflict(); $this->setAttribute('task_conflict', $task_conflict); $this->setAttribute('resource', $task_conflict->getCurrentResource()); $this->setAttribute('view_scope', $this->getScopeKey()); return 'Error'; } return $resource ? $this->executeRead($request_data) : 'Error'; }
public function handleError(AgaviRequestDataHolder $request_data) { parent::handleError($request_data); $errors = array(); $default_view = 'Input'; $validation_manager = $this->getContainer()->getValidationManager(); foreach ($validation_manager->getErrorMessages() as $error_info) { if (array_key_exists('errors', $error_info) && is_array($error_info['errors']) && reset($error_info['errors']) === 'token') { // If an invalid token was provided, escalate to the error template $default_view = 'Error'; } $errors[] = $error_info['message']; } $this->setAttribute('errors', $errors); return $default_view; }
public function handleError(AgaviRequestDataHolder $request_data) { parent::handleError($request_data); $this->setAttribute('aggregate_root_type', $this->getAggregateRootType()); return 'Error'; }
public function handleWriteError(AgaviRequestDataHolder $request_data) { parent::handleError($request_data); return $this->executeRead($request_data); }