Version: current

# Class OrderExporter

Контроллер для экспорта заказов возможно:

- получение списка заказов с указанием последнего полученного: /OrderExporter/listorders/$ID
- получение конкретного заказа по его id: /OrderExporter/getorder/$ID

  Object
  ViewableData implements IteratorAggregate
  RequestHandler
  Controller
  OrderExporter implements PermissionProvider

Package: cart
Author: menedem
Located at cart/code/OrderExporter.php

## Methods summary

`public static` | # `setup( array $params = array() )` Включение и настройка экспорта Включение и настройка экспорта #### Parameters $params array $params - параметры настройки, сейчас это: string 'url' если нужно указать альтернативную url bool 'as_file' если нужно возвращать xml в виде прицепленного файла
`public` | # `providePermissions( )` Return a map of permission codes to add to the dropdown shown in the Security section of the CMS. array( 'VIEW_SITE' => 'View the site', ); Return a map of permission codes to add to the dropdown shown in the Security section of the CMS. array( 'VIEW_SITE' => 'View the site', ); #### Implementation of `PermissionProvider::providePermissions()`
`public` | # `URLSegment( )`
`public` | # `init( )` Initialisation function that is run before any action on the controller is called. Initialisation function that is run before any action on the controller is called. #### Uses ``BasicAuth::requireLogin()`` #### Overrides `Controller::init`
`public` | # `listorders( `SS_HTTPRequest` $req )` Возвращает список заказов Возвращает список заказов принимает url параметр - id последнего загруженного заказа /OrderExporter/listorders/$ID возвращает более свежие заказы, xml формируется шаблоном OrderExporter TODO принимать в качестве отправной точки дату последнего экспорта #### Parameters $req SS_HTTPRequest $req
`public` | # `getorder( `SS_HTTPRequest` $req )` Возвращает один заказ по id Возвращает один заказ по id принимает url параметр - id заказа /OrderExporter/getorder/$ID xml формируется шаблоном OrderExport #### Parameters $req SS_HTTPRequest $req

### Methods inherited from Controller

`CurrentMember()`, `Now()`, `PastMember()`, `PastVisitor()`, `can()`, `curr()`, `defaultAction()`, `disableBasicAuth()`, `getAction()`, `getFormOwner()`, `getRequest()`, `getResponse()`, `getSession()`, `getURLParams()`, `getViewer()`, `handleAction()`, `handleRequest()`, `hasAction()`, `hasActionTemplate()`, `has_curr()`, `isAjax()`, `join_links()`, `popCurrent()`, `pushCurrent()`, `redirect()`, `redirectBack()`, `redirectedTo()`, `render()`, `setSession()`, `setURLParams()`

### Methods inherited from RequestHandler

`__construct()`, `allowedActions()`, `checkAccessAction()`, `httpError()`

### Methods inherited from ViewableData

`ATT_val()`, `BaseHref()`, `CSSClasses()`, `ColumnBreak()`, `ColumnCalc()`, `ColumnNumber()`, `ColumnPad()`, `ColumnPos()`, `CurrentPage()`, `Debug()`, `Even()`, `EvenOdd()`, `First()`, `FirstLast()`, `HasPerm()`, `IsAjax()`, `JS_val()`, `Last()`, `Me()`, `Middle()`, `MiddleString()`, `Modulus()`, `MultipleOf()`, `Odd()`, `Pos()`, `RAW_val()`, `SQL_val()`, `ThemeDir()`, `ThemeName()`, `Top()`, `TotalItems()`, `XML_val()`, `__get()`, `__isset()`, `__set()`, `buildCastingCache()`, `cachedCall()`, `castingClass()`, `castingHelper()`, `castingHelperPair()`, `castingObjectCreator()`, `castingObjectCreatorPair()`, `customise()`, `defineMethods()`, `escapeTypeForField()`, `getField()`, `getIterator()`, `getSecurityID()`, `getXMLValues()`, `hasField()`, `hasValue()`, `i18nLocale()`, `iteratorProperties()`, `obj()`, `renderWith()`, `setCustomisedObj()`, `setField()`

### Methods inherited from Object

`__call()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `exists()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

`public static string` | $URLSegment | #
`public static array` | $allowed_actions | # Define a list of action handling methods that are allowed to be called directly by URLs. The variable should be an array of action names. This sample shows the different values that it can contain: Define a list of action handling methods that are allowed to be called directly by URLs. The variable should be an array of action names. This sample shows the different values that it can contain:
    array(
            'someaction', // someaction can be accessed by anyone, any time
            'otheraction' => true, // So can otheraction
            'restrictedaction' => 'ADMIN', // restrictedaction can only be people with ADMIN privilege
            'complexaction' '->canComplexAction' // complexaction can only be accessed if $this->canComplexAction() returns true
    );
`public static boolean` | $return_as_file | #

### Properties inherited from Controller

`$action`, `$baseInitCalled`, `$basicAuthEnabled`, `$controller_stack`, `$request`, `$requestParams`, `$response`, `$session`, `$urlParams`, `$url_handlers`

### Properties inherited from RequestHandler

`$brokenOnConstruct`

### Properties inherited from ViewableData

`$casting`, `$customisedObject`, `$default_cast`, `$failover`, `$iteratorPos`, `$iteratorTotalItems`

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -