Версия: 6.x
burger close
Класс AbstractType
Граф наследования:AbstractType:
AbstractObject AcceptBehavior AcceptBehaviorInterface

Подробное описание

Абстрактный класс типа экспорта.

Открытые члены

 _init ()
 
 getTitle ()
 
 getDescription ()
 
 getShortName ()
 
 export ()
 
 getCacheFilePath ()
 
 sendHeaders ()
 
 getExportUrl ()
 
 getOfferTypeNames ()
 
 getOfferTypesData ()
 
 getOfferTypesJson ()
 
 getFieldMapJson ()
 
 getSelectedProductIds (ExportProfile $profile=null, $cache=true)
 
 getProductsSelectionQuery (ExportProfile $profile=null)
 
 setExportProfile (ExportProfile $profile)
 
 getExportProfile ()
 
 canExchangeByApi ()
 
 getExportActionCellTemplate ()
 
 getExportActionCell (ExportProfile $export)
 
- Открытые члены унаследованные от AbstractObject
static __construct ()
 
 __destruct ()
 
 fillDefaults ()
 
 getClassParameter ($key=null)
 
 setClassParameter ($key, $value=null)
 
 issetClassParameter ($key=null)
 
 setLocalParameter ($key, $value=null)
 
 getLocalParameter ($key, $default=null)
 
 getParameter ($key, $default=null)
 
 setPropertyIterator (PropertyIterator $iterator)
 
 checkRights ($bool)
 
 clear ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 __set ($offset, $value)
 
 __get ($offset)
 
 offsetUnset ($offset)
 
 getShortAlias ()
 
 load ($primaryKeyValue=null)
 
 insert ($ignore=false, $on_duplicate_update_keys=[], $on_duplicate_uniq_fields=[])
 
 update ($primaryKey=null)
 
 replace ()
 
 delete ()
 
 exists ($primaryKeyValue)
 
 getFromArray (array $data, $remove_prefix=null, $mark_modify=true, $call_afterload_event=false)
 
 getValues ()
 
 isModified ($property)
 
 getPropertyIterator ()
 
 appendProperty (array $properties)
 
 _getTableArray ()
 
 getPrimaryKeyProperty ()
 
 getProperties ()
 
 getProp ($offset)
 
 save ($primaryKeyValue=null, $user_post=[], $post_var=null, $files_var=null)
 
 replaceOn ($bool)
 
 setWriteBit ($n)
 
 usePostKeys (array $keys)
 
 excludePostKeys (array $keys)
 
 checkData ($user_post=[], $post_var=null, $files_var=null, $usekeys=null, $exclude=null, $flag=self::UPDATE_FLAG)
 
 fillFromPost ($user_post=[], $post_var=null, $files_var=null, $usekeys=null, $exclude=null)
 
 validateData ($flag=self::UPDATE_FLAG)
 
 validate ()
 
 setCheckFields (array $fields)
 
 escapeFields (array $escape_fields)
 
 escapeAll ($bool)
 
 checkField ($property)
 
 addError ($string, $form=null)
 
 addErrors ($array, $form=null)
 
 getLastError ()
 
 getErrors ()
 
 getErrorsStr ()
 
 hasError ()
 
 getFormError ()
 
 getErrorsByForm ($key=null, $sep=null)
 
 getDisplayErrors ()
 
 noWriteRights ($right=DefaultModuleRights::RIGHT_UPDATE)
 
 getNonFormErrors ()
 
 clearErrors ()
 
 setTemporaryId ()
 
 setFormTemplate ($template)
 
 dbUpdate ()
 
 addIndex ($fields, $type=self::INDEX_KEY, $name=null, $using=null)
 
 getIndexes ()
 
 getForm (array $tpl_vars=null, $switch=null, $is_multiedit=false, $template=null, $tpl_maker=null, $tpl_folder=null)
 
 getPropertyView ($key, $attributes=[], $view_params=[])
 
 getHiddenKeyVal ()
 
 addHiddenFields ($keys, $value=null)
 
 addDebugActions (array $actions, $local=false)
 
 addDebugAction (\RS\Debug\Action\AbstractAction $action, $local=false)
 
 getDebugAttributes ()
 
 beforeWrite ($save_flag)
 
 afterWrite ($save_flag)
 
 afterObjectLoad ()
 
 getDebugActions ()
 
 dropTable ()
 
 exportErrors ()
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 
 __sleep ()
 
 __wakeup ()
 
 __clone ()
 
 __isset ($offset)
 
 getRightRead ()
 
 getRightCreate ()
 
 getRightUpdate ()
 
 getRightDelete ()
 
 getHtmlEncodedFields ()
 
- Открытые члены унаследованные от AcceptBehavior
 attachInstanceBehavior (BehaviorAbstract $behavior_class)
 
 detachInstanceBehavior (BehaviorAbstract $behavior_class=null)
 
 getAttachedBehaviors ()
 
 behaviorMethodExists ($method_name)
 
 __call ($method_name, $arguments)
 
- Открытые члены унаследованные от AcceptBehaviorInterface
 attachInstanceBehavior (\RS\Behavior\BehaviorAbstract $behavior_class)
 
 detachInstanceBehavior (\RS\Behavior\BehaviorAbstract $behavior_class=null)
 

Поля данных

const CHARSET = 'utf-8'
 
- Поля данных унаследованные от AbstractObject
const INSERT_FLAG = 'insert'
 
const UPDATE_FLAG = 'update'
 
const REPLACE_FLAG = 'replace'
 
const INDEX_PRIMARY = 'primary key'
 
const INDEX_UNIQUE = 'unique'
 
const INDEX_KEY = 'index'
 
const INDEX_FULLTEXT = 'fulltext'
 
- Поля данных унаследованные от AcceptBehavior
 $class_behaviors = []
 
 $cache_behavior_instances = []
 
 $instance_behaviors = []
 

Защищенные члены

 getStorageInstance ()
 
 getOfferTypesClasses ()
 
 getOfferTypes ()
 
 exportOffers (ExportProfile $profile,\XMLWriter $writer)
 
 fireAfterAllOffersEvent ($event_name, ExportProfile $profile,\XMLWriter $writer)
 
- Защищенные члены унаследованные от AbstractObject
 initProperties ()
 
 _init ()
 
 _initDefaults ()
 
 afterInit ()
 
 getStorageInstance ()
 
 getTableEngine ()
 
 getPropertyHash ($is_multiedit, $switch=null)
 

Защищенные данные

 $offer_types
 
 $offer_types_data
 
 $cacheSelectedProductIds
 
- Защищенные данные унаследованные от AbstractObject
 $_values = []
 
 $_self_class
 
 $_local_id
 

Дополнительные унаследованные члены

- Открытые статические члены унаследованные от AbstractObject
static loadByWhere ($expr, array $values=null, $prefix= 'AND', $in_prefix= 'AND')
 
static _getTable ()
 
static chkDepend ($coreobj, $value, $real_errtext, $real_chk, array $conditions, $real_params=[])
 
static destroyClass ()
 
- Открытые статические члены унаследованные от AcceptBehavior
static attachClassBehavior (BehaviorAbstract $behavior_class)
 
static detachClassBehavior (BehaviorAbstract $behavior_class=null)
 
- Открытые статические члены унаследованные от AcceptBehaviorInterface
static attachClassBehavior (\RS\Behavior\BehaviorAbstract $behavior_class)
 
static detachClassBehavior (\RS\Behavior\BehaviorAbstract $behavior_class=null)
 
- Защищенные статические члены унаследованные от AbstractObject
static _tableName ($with_quotes=true)
 
static _dbName ($with_quotes=true)
 
- Статические защищенные данные унаследованные от AbstractObject
static $db = DB_NAME
 
static $table = null
 
static $iterator = 0
 
static $init_default_method = '_initDefaults'
 
static $local = []
 
static $default_local_parameters
 
static static $class = []
 
static $default_class_parameters
 

Методы

_init ( )
canExchangeByApi ( )

Возвращает true, если профиль экспорта может обмениваться по API

Возвращает
bool
export ( )
abstract

Возвращает экспортированные данные (XML, CSV, JSON и т.п.)

Возвращает
string
exportOffers ( ExportProfile  $profile,
\XMLWriter  $writer 
)
protected

Экспорт Товарных предложений

Аргументы
ExportProfile$profile
\XMLWriter$writer
Исключения
\Exception
fireAfterAllOffersEvent (   $event_name,
ExportProfile  $profile,
\XMLWriter  $writer 
)
protected

Событие, которое вызывается после записи всех твоаров

Аргументы
string$event_name- уникальная часть итогового имени события
ExportProfile$profile- объект профиля экспорта
\XMLWriter$writer- объект библиотеки для записи XML
Возвращает
EventResult
getCacheFilePath ( )

Возвращает полный путь к файлу, содержащему экспортированные данные

Возвращает
string
Исключения
RSException
getDescription ( )
abstract

Возвращает описание типа экспорта. Возможен HTML

Возвращает
string
getExportActionCell ( ExportProfile  $export)

Возвращает готовый HTML для ячейки с ссылкой на обмен таблицы

Аргументы
ExportProfile$export
Возвращает
string
Исключения
\SmartyException
getExportActionCellTemplate ( )

Возвращает путь к шаблону для рендеринга ячейки с действиями над профилем

Возвращает
string
getExportProfile ( )

Возвращает объект родительского профиля экспорта

Возвращает
ExportProfile
Исключения
RSException
getExportUrl ( )

Возвращает ссылку на файл экспорта

Возвращает
string
Исключения
RSException
getFieldMapJson ( )

Возвращает массив соответсвия полей (fieldmap) в виде JSON

Возвращает
string
getOfferTypeNames ( )

Возвращает массив доступных типов описания товарных предложений

Возвращает
array
getOfferTypes ( )
protected

Возвращает массив доступных типов описания товарных предложений

Возвращает
array
getOfferTypesClasses ( )
abstractprotected

Возвращает список классов типов описания

Возвращает
[]
getOfferTypesData ( )

Возвращает массив данных по всем типам описания

Возвращает
array
getOfferTypesJson ( )

Возвращает массив данных по всем типам описания в виде JSON

Возвращает
string
getProductsSelectionQuery ( ExportProfile  $profile = null)

Возвращает объект запроса на выборку товаров с учетом опций профиля экспорта

Аргументы
ExportProfile$profile
Возвращает
OrmRequest
getSelectedProductIds ( ExportProfile  $profile = null,
  $cache = true 
)

Возвращает массив идентификаторов выбранных товаров

Аргументы
ExportProfile$profile
bool$cache- использовать кеш
Возвращает
array
getShortName ( )
abstract

Возвращает идентификатор данного типа экспорта. (только англ. буквы)

Возвращает
string
getStorageInstance ( )
protected

Возвращает объект хранилища

Возвращает
AbstractStorage
getTitle ( )
abstract

Возвращает название расчетного модуля (типа экспорта)

Возвращает
string
sendHeaders ( )

Если для экспорта нужны какие-то специфические заголовки, то их нужно отправлять в этом методе

setExportProfile ( ExportProfile  $profile)

Устанавливает объект родительского профиля экспорта

Аргументы
ExportProfile$profile
Возвращает
self

Поля

$cacheSelectedProductIds
protected
$offer_types
protected
$offer_types_data
protected
const CHARSET = 'utf-8'