com\setasign\Konquadrat\Object\Custom

XlsExportObject Konquadrat Object "XlsExport"

File: /Konquadrat/src/Object/Custom/generated/XlsExportObject.php

Class hierarchy

Uses

Implements

Summary

Constants

ACTION_DELETE

ACTION_READ

ACTION_WRITE

EVENT_AFTER_SAVE

Event is triggered after save

params:

  • $this
  • array $changes

EVENT_AFTER_SAVE_AND_COMMIT

Event is triggered after save and after the current transaction is committed.

params:

  • $this
  • array $changes

EVENT_AFTER_SAVE_AND_ROLLBACK

Event is triggered after save and after the current transaction is rolled back.

params:

  • $this
  • ?array $changes

EVENT_AFTER_SAVE_ERROR

Event is triggered while saving if something went wrong

params:

  • $this
  • Throwable $exception

EVENT_BEFORE_SAVE

Event is triggered before save

params:

  • $this
  • bool $force

EVENT_CREATE

Event is triggered on creation of a new object (before the first save)

params:

  • $this

NAME

public const XlsExportObject::NAME = 'XlsExport'

Properties

$STATUS_FINISHED

protected Traits\TaskTpl::$STATUS_FINISHED = 'finished'

$STATUS_READING_DATA

protected Traits\ExportTpl::$STATUS_READING_DATA = 'reading_data'

$STATUS_READ_DATA

protected Traits\ExportTpl::$STATUS_READ_DATA = 'read_data'

$STATUS_START

protected Traits\TaskTpl::$STATUS_START = 'started'

$STATUS_WRITING_FILE

protected Traits\ExportTpl::$STATUS_WRITING_FILE = 'writing_file'

$data

$logger

protected ?\Psr\Log\LoggerInterface \com\setasign\Konquadrat\Object\AbstractObject::$logger

$readLimit

protected Traits\ExportTpl::$readLimit = 5000

$sleep

All properties which should be serialized.

Note: Private properties cannot be serialized!

$smarty


Static Methods

getGuiFormConfig()

Parameters
$languageManager : \com\setasign\Konquadrat\LanguageManager
 

Methods

__construct()

Parameters
$objectConfig : \com\setasign\Konquadrat\Object\ObjectConfig
 
$objectFinder : \com\setasign\Konquadrat\Object\ObjectFinder
 
$objectManager : \com\setasign\Konquadrat\Object\ObjectManager
 
$transactionManager : \com\setasign\Konquadrat\Object\TransactionManager
 
$languageManager : \com\setasign\Konquadrat\LanguageManager
 
$fieldFactory : \com\setasign\Konquadrat\Field\FieldFactory\FieldFactoryInterface
 
$documentResolver : \com\setasign\Konquadrat\Object\DocumentResolverInterface
 
$actionResolver : \com\setasign\Konquadrat\Object\ActionResolverInterface
 
$resourceDefinitionManager : \com\setasign\Konquadrat\Permission\ResourceDefinitionManager
 
$initTraitResolver : \com\setasign\Konquadrat\Object\InitTraitResolverInterface
 
$wakeupResolver : \com\setasign\Konquadrat\Object\WakeupObjectResolverInterface
 
$data : array
 
$objectScope : ?\com\setasign\Konquadrat\Object\Scope\ScopeInterface
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

__call()

public \com\setasign\Konquadrat\Object\AbstractObject::__call (
string $name,
array $arguments
): ?mixed

Give some magic methods:

  • getField{$fieldName}() -> Alias for getField($fieldName)
  • getChild{$objectType}Objects() -> Alias for getChilds($objectType)
  • getReferencing{$objectType}ObjectsBy{$fieldName}Field() -> Alias for getReferencingObjects($objectType, $fieldName)
Parameters
$name : string
 
$arguments : array
 

__get()

public \com\setasign\Konquadrat\Object\AbstractObject::__get (
string $fieldName
): ?mixed

Alias for get($fieldName, true)

Parameters
$fieldName : string
 
Exceptions

Throws \com\setasign\Konquadrat\Object\MissingConfigurationException

See

__isset()

public \com\setasign\Konquadrat\Object\AbstractObject::__isset (
string $fieldName
): bool

Checks whether $fieldName exists and the value is not null.

Parameters
$fieldName : string
 

__set()

public \com\setasign\Konquadrat\Object\AbstractObject::__set (
string $fieldName,
mixed $value
): void

Alias for set($fieldName, $value)

Parameters
$fieldName : string
 
$value : mixed
 
See

__sleep()

__wakeup()

Exceptions

Throws \Throwable

addEventListener()

final public \com\setasign\Konquadrat\Object\AbstractObject::addEventListener (
string $eventName,
string $name,
callable $callback
): void
Parameters
$eventName : string
 
$name : string

The name of this callback. The name is only unique for this method & object.

$callback : callable
 

calculateHash()

protected Traits\ExportTpl::calculateHash (
string $dataHash
): string
Parameters
$dataHash : string
 

callAction()

final public \com\setasign\Konquadrat\Object\AbstractObject::callAction (
string $action,
array $additionalArguments = array ( )
): ?\com\setasign\Konquadrat\Object\Action\ActionResponse
Parameters
$action : string
 
$additionalArguments : array
 
Exceptions

Throws \InvalidArgumentException If the action is unknown.

checkHash()

protected Traits\ExportTpl::checkHash (
string $hash
): void
Parameters
$hash : string
 
Exceptions

Throws \com\setasign\Konquadrat\Controller\Backend\ExportAlreadyExistsException

copyObjectData()

Copy the data of $object into this object. All fields of AbstractObject will be ignored (including the parent).

Parameters
$object : \com\setasign\Konquadrat\Object\AbstractObjectInterface
 
$onlyTypes : null|string|string[]
 

create()

The method will be called when a new object is created.

customRenderer()

protected Traits\XlsExportTpl::customRenderer (
\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet,
\PhpOffice\PhpSpreadsheet\Cell\Cell $cell,
$value,
$columnConfig
): void
Parameters
$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
 
$cell : \PhpOffice\PhpSpreadsheet\Cell\Cell
 
$value
 
$columnConfig
 
Exceptions

Throws \PhpOffice\PhpSpreadsheet\Exception

Throws \Exception

delete()

public \com\setasign\Konquadrat\Object\AbstractObject::delete (
bool $recursive = true
): array

Marks the object as deleted and saves the object.

Existing references will not be unlinked, but you could find these objects with ObjectFinder::getReferencingObjects()!

This method will create a transaction if no transaction is active and revert everything if an error is thrown.

Parameters
$recursive : bool

Delete also all childs.

Return Values

Array with the ids of all deleted objects.

Exceptions

Throws \Throwable

fillCell()

protected Traits\XlsExportTpl::fillCell (
\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet,
\PhpOffice\PhpSpreadsheet\Cell\Cell $cell,
$dataRow,
$column,
$gridConfig,
$gridId
): void
Parameters
$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
 
$cell : \PhpOffice\PhpSpreadsheet\Cell\Cell
 
$dataRow
 
$column
 
$gridConfig
 
$gridId
 
Exceptions

Throws \PhpOffice\PhpSpreadsheet\Exception

Throws \Exception

fillHeadings()

protected Traits\XlsExportTpl::fillHeadings (
\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet,
array $columns,
array $gridConfig
): void
Parameters
$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
 
$columns : array
 
$gridConfig : array
 
Exceptions

Throws \PhpOffice\PhpSpreadsheet\Exception

filterDataChunk()

protected Traits\ExportTpl::filterDataChunk (
array $dataChunk
): array
Parameters
$dataChunk : array
 

get()

final public \com\setasign\Konquadrat\Object\AbstractObject::get (
string $fieldName,
bool $resolve = true
): ?mixed

Get the value of $fieldName.

Parameters
$fieldName : string
 
$resolve : bool

Resolve resolvable fields like reference and json fields.

getAs()

final public \com\setasign\Konquadrat\Object\AbstractObject::getAs (
string $name
): \com\setasign\SetaFramework\FileSystem\File

Get the object as document of type $name

Parameters
$name : string
 
Exceptions

Throws \InvalidArgumentException If the name is invalid!

getChanged()

getChilds()

final public \com\setasign\Konquadrat\Object\AbstractObject::getChilds (
null|\com\setasign\Konquadrat\Object\class-string<\com\setasign\Konquadrat\Object\T>|string[] $type = null
): \com\setasign\Konquadrat\Object\ObjectSet<\com\setasign\Konquadrat\Object\T>|\com\setasign\Konquadrat\Object\SmartObjectSet<\com\setasign\Konquadrat\Object\T>
Parameters
$type : null|\com\setasign\Konquadrat\Object\class-string<\com\setasign\Konquadrat\Object\T>|string[]
 

getData()

final public \com\setasign\Konquadrat\Object\AbstractObject::getData (
bool $resolveMagicFields = true
): array

Returns the data of the fields of this object.

MultiLangString, MultiLangText and Password fields are ignored.

Parameters
$resolveMagicFields : bool
 

getDataoriginName()

public Traits\TaskTpl::getDataoriginName (
void
): string

getField()

Gets the field instance of $fieldName.

Parameters
$fieldName : string
 
Exceptions

Throws \com\setasign\Konquadrat\Object\MissingConfigurationException If the field isn't configured.

getFieldContainerName()

getFields()

Get all fields

getInitialData()

getMagicWithParam()

final public \com\setasign\Konquadrat\Object\AbstractObject::getMagicWithParam (
string $fieldName,
array $parameters
): string
Parameters
$fieldName : string
 
$parameters : array
 

getPath()

getPermissionResource()

final public \com\setasign\Konquadrat\Object\AbstractObject::getPermissionResource (
void
): \com\setasign\SetaFramework\Permissions\ResourceDefinition

getProgress()

public Traits\ExportTpl::getProgress (
void
): float

getReferencingObjects()

final public \com\setasign\Konquadrat\Object\AbstractObject::getReferencingObjects (
\com\setasign\Konquadrat\Object\class-string<\com\setasign\Konquadrat\Object\T> $type,
string $field
): \com\setasign\Konquadrat\Object\ObjectSet<\com\setasign\Konquadrat\Object\T>|\com\setasign\Konquadrat\Object\SmartObjectSet<\com\setasign\Konquadrat\Object\T>
Parameters
$type : \com\setasign\Konquadrat\Object\class-string<\com\setasign\Konquadrat\Object\T>
 
$field : string
 

getSanitizedFilename()

protected Traits\ExportTpl::getSanitizedFilename (
void
): string

getTabHeader()

Get the text header which will be shown in the gui.

getTaskFinished()

public Traits\TaskTpl::getTaskFinished (
void
): string

getTaskInfo()

public Traits\TaskTpl::getTaskInfo (
void
): array

hasAction()

final public \com\setasign\Konquadrat\Object\AbstractObject::hasAction (
string $action
): bool
Parameters
$action : string
 

hasDocument()

final public \com\setasign\Konquadrat\Object\AbstractObject::hasDocument (
string $name
): bool
Parameters
$name : string
 

hasField()

final public \com\setasign\Konquadrat\Object\AbstractObject::hasField (
string $fieldName
): bool

Checks whether the object has the field $fieldName.

Parameters
$fieldName : string
 

initAndWakeupExportTpl()

initAndWakeupXlsExportTpl()

public Traits\XlsExportTpl::initAndWakeupXlsExportTpl (
\Smarty\Smarty $smarty
): void
Parameters
$smarty : \Smarty\Smarty
 

initTaskTpl()

public Traits\TaskTpl::initTaskTpl (
void
): void

isSettingData()

Will be true when the data from the database will be inserted into the object.

For the most set-methods you will need to react on this.

parseTime()

protected Traits\XlsExportTpl::parseTime (
$value
): float|int
Parameters
$value
 
Exceptions

Throws \Exception

prepareParamsForGridExport()

public Traits\ExportTpl::prepareParamsForGridExport (
array $params
): array
Parameters
$params : array
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

process()

public Traits\ExportTpl::process (
void
): void
Exceptions

Throws \Throwable

processExport()

protected Traits\XlsExportTpl::processExport (
void
): void
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \PhpOffice\PhpSpreadsheet\Exception

Throws \PhpOffice\PhpSpreadsheet\Reader\Exception

Throws \PhpOffice\PhpSpreadsheet\Writer\Exception

Throws \com\setasign\Konquadrat\Object\UnknownObjectException

reload()

Reloads the object.

All changed data will be reset!!

Exceptions

Throws \BadMethodCallException If the object was never saved!

Throws \com\setasign\Konquadrat\Object\UnknownObjectException If the object cannot be found!

removeEventListener()

final public \com\setasign\Konquadrat\Object\AbstractObject::removeEventListener (
string $eventName,
string $name
): void
Parameters
$eventName : string
 
$name : string
 

resetField()

final public \com\setasign\Konquadrat\Object\AbstractObject::resetField (
string $fieldName
): void

Resets the field to the initial value.

Parameters
$fieldName : string
 

restartTaskAction()

WARNING: This method is marked as deprecated!

Use continueTaskAction() instead.

Exceptions

Throws \com\setasign\Konquadrat\Exception

save()

Save the object.

Parameters
$force : bool

Save everytime no matter whether there was a change

Exceptions

Throws \com\setasign\Konquadrat\Object\ObjectSaveException If an error occurs during the save process.

set()

Sets the value for the field.

Parameters
$fieldName : string
 
$value : mixed|\com\setasign\Konquadrat\Field\DefaultValue
 

setData()

final public \com\setasign\Konquadrat\Object\AbstractObject::setData (
array $data,
bool $ignoreMissingFields = false
): void

Set multiple fields at once.

Parameters
$data : array
 
$ignoreMissingFields : bool

If true unknown fields will just be ignored.

setLogger()

final public \com\setasign\Konquadrat\Object\AbstractObject::setLogger (
\Psr\Log\LoggerInterface $logger
): void
Parameters
$logger : \Psr\Log\LoggerInterface
 

setParams()

public Traits\XlsExportTpl::setParams (
$params
): void
Parameters
$params
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \com\setasign\Konquadrat\Object\UnknownObjectException

Throws \JsonException

Throws \com\setasign\SetaFramework\Permissions\PermissionException