Index
-
\com\setasign\Konquadrat
-
Object
- AbstractCachingDocument
- AbstractObject
- AbstractObjectInterface
- AbstractObjectSet
- Action
- ActionResolver
- ActionResolverInterface
- Custom
- Database
- DocumentInterface
- DocumentResolver
- DocumentResolverInterface
- GlobalDiWakeupObjectResolver
- History
- ImportInterface
- InitTraitResolver
- InitTraitResolverInterface
- InstancePool
- InstancePoolInterface
- InstancePoolManager
- ManualQueryBuilder
- MassActionResolver
- MassActionResolverInterface
- MessageList
- MissingConfigurationException
- ObjectConfig
- ObjectFactory
- ObjectFactoryInterface
- ObjectFinder
- ObjectManager
- ObjectSaveException
- ObjectSet
- ObjectSet
- ObjectTableManager
- Scope
- Selector
- SmartObjectSet
- TemporaryReference
- TransactionManager
- UnknownObjectException
- WakeupObjectResolverInterface
-
Object
com\setasign\Konquadrat\Object
AbstractObject Class AbstractObject
File: /Konquadrat/src/Object/AbstractObject.php
Class hierarchy
- AbstractObject
- Custom\CallActionTaskObject
- Custom\CheckinObject
- Custom\CheckinRelationObject
- Custom\CheckinSubjectRelationObject
- Custom\ConfigExportObject
- Custom\CrashReportObject
- Custom\CsvImportFileObject
- Custom\CustomExportObject
- Custom\DashboardObject
- Custom\DatasourceObject
- Custom\EditColumnTaskObject
- Custom\GridObject
- Custom\GridViewObject
- Custom\ImportDefinitionObject
- Custom\ImportFileObject
- Custom\ImportObject
- Custom\ImportSchemaObject
- Custom\ImportTaskObject
- Custom\Mail\DefaultSenderObject
- Custom\Mail\EmailAttachmentObject
- Custom\Mail\EmailAttachmentRelationObject
- Custom\Mail\EmailObject
- Custom\Mail\EmailTemplateAttachmentRelationObject
- Custom\Mail\SmartyTemplateObject
- Custom\Mail\StaticEmailAttachmentObject
- Custom\Mail\StaticUnsyncedEmailAttachmentObject
- Custom\MobileCheckinAuthDeviceObject
- Custom\MobileCheckinAuthObject
- Custom\MobileCheckinAuthRelationObject
- Custom\NamedDashboardObject
- Custom\NamedDataoriginObject
- Custom\NoteObject
- Custom\NumberRangeObject
- Custom\TxtExportObject
- Custom\UserObject
- Custom\WorkflowObject
- Custom\WorkflowTextItemObject
- Custom\XlsExportObject
- Custom\XlsImportFileObject
- Custom\XlsxImportFileObject
Implements
- \Psr\Log\LoggerAwareInterface
- \com\setasign\Konquadrat\Field\FieldContainer\FieldContainerInterface
- AbstractObjectInterface
Summary
Methods
- __construct()
- __call()
- __clone()
- __get()
- __isset()
- __set()
- __sleep()
- __wakeup()
- addEventListener()
- callAction()
- copyObjectData()
- create()
- delete()
- get()
- getAs()
- getChanged()
- getChilds()
- getData()
- getField()
- getFieldContainerName()
- getFields()
- getInitialData()
- getMagicWithParam()
- getPath()
- getPermissionResource()
- getReferencingObjects()
- getTabHeader()
- hasAction()
- hasDocument()
- hasField()
- isSettingData()
- reload()
- removeEventListener()
- resetField()
- save()
- set()
- setData()
- setLogger()
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
Properties
$actionResolver
$documentResolver
$fieldFactory
$fieldsConfig
Fields config
$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.
See
$languageManager
$logger
$objectConfig
$objectFinder
$objectManager
$resourceDefinitionManager
$sleep
All properties which should be serialized.
Note: Private properties cannot be serialized!
$transactionManager
Methods
__construct()
ObjectFinder $objectFinder,
ObjectManager $objectManager,
TransactionManager $transactionManager,
\com\setasign\Konquadrat\LanguageManager $languageManager,
\com\setasign\Konquadrat\Field\FieldFactory\FieldFactoryInterface $fieldFactory,
DocumentResolverInterface $documentResolver,
ActionResolverInterface $actionResolver,
\com\setasign\Konquadrat\Permission\ResourceDefinitionManager $resourceDefinitionManager,
InitTraitResolverInterface $initTraitResolver,
WakeupObjectResolverInterface $wakeupResolver,
array $data,
?Scope\ScopeInterface $objectScope = null
Parameters
- $objectConfig : ObjectConfig
- $objectFinder : ObjectFinder
- $objectManager : ObjectManager
- $transactionManager : TransactionManager
- $languageManager : \com\setasign\Konquadrat\LanguageManager
- $fieldFactory : \com\setasign\Konquadrat\Field\FieldFactory\FieldFactoryInterface
- $documentResolver : DocumentResolverInterface
- $actionResolver : ActionResolverInterface
- $resourceDefinitionManager : \com\setasign\Konquadrat\Permission\ResourceDefinitionManager
- $initTraitResolver : InitTraitResolverInterface
- $wakeupResolver : WakeupObjectResolverInterface
- $data : array
- $objectScope : ?Scope\ScopeInterface
Exceptions
__call()
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()
Alias for get($fieldName, true)
Parameters
- $fieldName : string
Exceptions
Throws MissingConfigurationException
See
addEventListener()
string $name,
callable $callback
Parameters
- $eventName : string
- $name : string
The name of this callback. The name is only unique for this method & object.
- $callback : callable
callAction()
array $additionalArguments = array ( )
Parameters
- $action : string
- $additionalArguments : array
Exceptions
Throws \InvalidArgumentException If the action is unknown.
copyObjectData()
Copy the data of $object into this object. All fields of AbstractObject will be ignored (including the parent).
Parameters
- $object : AbstractObjectInterface
- $onlyTypes : null|string|string[]
delete()
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
get()
Get the value of $fieldName.
Parameters
- $fieldName : string
- $resolve : bool
Resolve resolvable fields like reference and json fields.
getAs()
Get the object as document of type $name
Parameters
- $name : string
Exceptions
Throws \InvalidArgumentException If the name is invalid!
getChilds()
Parameters
- $type : null|class-string<T>|string[]
getData()
Returns the data of the fields of this object.
MultiLangString, MultiLangText and Password fields are ignored.
Parameters
- $resolveMagicFields : bool
getField()
Gets the field instance of $fieldName.
Parameters
- $fieldName : string
Exceptions
Throws MissingConfigurationException If the field isn't configured.
getPermissionResource()
getReferencingObjects()
string $field
Parameters
- $type : class-string<T>
- $field : string
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.
reload()
Reloads the object.
All changed data will be reset!!
Exceptions
Throws \BadMethodCallException If the object was never saved!
Throws UnknownObjectException If the object cannot be found!
save()
Save the object.
Parameters
- $force : bool
Save everytime no matter whether there was a change
Exceptions
Throws 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()
Set multiple fields at once.
Parameters
- $data : array
- $ignoreMissingFields : bool
If true unknown fields will just be ignored.
