{"$schema":"https://yii2-framework.github.io/docs/reference/reference.schema.json","schemaVersion":1,"package":"soft-delete","title":"Soft Delete","repository":"https://github.com/yii2-extensions/soft-delete","ref":"main","commit":"e037c06475c75f16c23f92011bb6120486833656","generatedAt":"2026-12-03","url":"https://yii2-framework.github.io/docs/extensions/soft-delete/reference/","types":{"yii2\\extensions\\softdelete\\Condition":{"kind":"class","modifiers":["final"],"url":"https://yii2-framework.github.io/docs/extensions/soft-delete/reference/condition/","summary":"Marks a query condition as owned by the soft-delete scope and qualifies its bare column names with a table alias.","extends":"yii\\db\\conditions\\AndCondition","implements":["yii\\db\\conditions\\ConditionInterface"],"methods":{"__construct":{"signature":"public function __construct(array<array-key, mixed> $condition, string|null $alias = null)","summary":"Creates a condition with optional table-alias qualification.","params":[{"name":"$condition","type":"array<array-key, mixed>","description":"Condition in Yii array format, kept unqualified for `withAlias()`. The rows of an `in` column tuple given as a `Traversable` are read each time the condition is qualified, so pass an array or a rewindable iterator: a generator cannot be read again by a later `withAlias()`."},{"name":"$alias","type":"string|null","default":"null","optional":true,"description":"Table alias that qualifies bare column names, or `null` to keep them unqualified."}]},"map":{"signature":"public static function map(array<array-key, mixed> $condition, Closure(self): ?self $map): array<array-key, mixed>|null","summary":"Applies the callback to every soft-delete scope inside an `and` condition, recursing into nested `and` operands.","params":[{"name":"$condition","type":"array<array-key, mixed>","description":"Query condition in Yii array format."},{"name":"$map","type":"Closure(self): ?self","description":"Callback that returns the replacement scope, or `null` to remove it."}],"return":{"type":"array<array-key, mixed>|null","description":"The mapped condition, or `null` when no operand remains."},"static":true},"withAlias":{"signature":"public function withAlias(string $alias): self","summary":"Returns a new scope with the original condition qualified with the given table alias.","params":[{"name":"$alias","type":"string"}],"return":{"type":"self"}}},"inherited":{"properties":{"expressions":"yii\\db\\conditions\\ConjunctionCondition"},"methods":{"fromArrayDefinition":"yii\\db\\conditions\\ConjunctionCondition","getExpressions":"yii\\db\\conditions\\ConjunctionCondition","getOperator":"yii\\db\\conditions\\AndCondition"}}},"yii2\\extensions\\softdelete\\DeleteBehavior":{"kind":"class","url":"https://yii2-framework.github.io/docs/extensions/soft-delete/reference/deletebehavior/","summary":"Marks ActiveRecord models as deleted instead of removing their rows, and restores them from that state.","extends":"yii\\base\\Behavior","implements":["yii\\base\\Configurable"],"properties":{"allowDeleteCallback":{"type":"mixed","default":"null","description":"Callback that decides whether `softDelete()` deletes the row physically instead of marking it, or `null` to always mark it."},"deleteFallbackException":{"type":"string","default":"\\yii\\db\\IntegrityException::class","description":"Class name of the `Throwable` that makes `safeDelete()` fall back to a soft delete when the physical delete raises it or one of its subclasses."},"invokeDeleteEvents":{"type":"bool","default":"true","description":"Whether `softDelete()` runs the owner's `yii\\db\\BaseActiveRecord::beforeDelete()` and `yii\\db\\BaseActiveRecord::afterDelete()`."},"restoreAttributeValues":{"type":"array<string, mixed>|null","default":"null","description":"Values written on restoration, by attribute name."},"softDeleteAttributeValues":{"type":"array<string, mixed>","default":"['isDeleted' => true]","description":"Values written on soft deletion, by attribute name, such as a flag or a status: ```php ['isDeleted' => true] ['statusId' => Item::STATUS_DELETED] ``` A non-scalar callable is a computed value: it receives the owner and returns the value to write."},"useRestoreAttributeValuesAsDefaults":{"type":"bool","default":"false","description":"Whether inserting a record fills its `null` attributes with the restore values."}},"methods":{"afterRestore":{"signature":"public function afterRestore(): void","summary":"Runs the owner's public `afterRestore()`, when declared, and triggers `EVENT_AFTER_RESTORE`.","return":{"type":"void"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the owner declares `afterRestore()` with a visibility other than public."}]},"afterSoftDelete":{"signature":"public function afterSoftDelete(): void","summary":"Runs the owner's public `afterSoftDelete()`, when declared, and triggers `EVENT_AFTER_SOFT_DELETE`.","return":{"type":"void"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the owner declares `afterSoftDelete()` with a visibility other than public."}]},"beforeInsert":{"signature":"public function beforeInsert(yii\\base\\Event $event): void","summary":"Fills the `null` attributes of a record being inserted with the restore values while `$useRestoreAttributeValuesAsDefaults` is enabled; handles `yii\\db\\BaseActiveRecord::EVENT_BEFORE_INSERT`.","params":[{"name":"$event","type":"yii\\base\\Event"}],"return":{"type":"void"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the restore values cannot be inferred."}]},"beforeRestore":{"signature":"public function beforeRestore(): bool","summary":"Runs the owner's public `beforeRestore()`, when declared, and triggers `EVENT_BEFORE_RESTORE`.","return":{"type":"bool","description":"Whether the restoration may proceed; `false` when the owner method returns a falsy value, in which case the event is not triggered, or when an event handler invalidates the event."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the owner declares `beforeRestore()` with a visibility other than public."}]},"beforeSoftDelete":{"signature":"public function beforeSoftDelete(): bool","summary":"Runs the owner's public `beforeSoftDelete()`, when declared, and triggers `EVENT_BEFORE_SOFT_DELETE`.","return":{"type":"bool","description":"Whether the soft deletion may proceed; `false` when the owner method returns a falsy value, in which case the event is not triggered, or when an event handler invalidates the event."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the owner declares `beforeSoftDelete()` with a visibility other than public."}]},"events":{"signature":"public function events(): array<string, string>","summary":"Registers the owner event that can apply active marker defaults before insertion.","return":{"type":"array<string, string>","description":"Owner events handled by the behavior."}},"isDeleteAllowed":{"signature":"protected function isDeleteAllowed(): bool","summary":"Returns whether `softDelete()` deletes the row physically, as decided by `$allowDeleteCallback`.","return":{"type":"bool","description":"Whether the physical delete is allowed; `false` when no callback is configured."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the callback is not callable or does not return a `bool`."}],"visibility":"protected"},"resolveRestoreAttributeValues":{"signature":"public function resolveRestoreAttributeValues(): array<string, mixed>","summary":"Returns the values written on restoration.","return":{"type":"array<string, mixed>","description":"Values by attribute name."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When a soft-delete value has no inferable counterpart."}]},"restore":{"signature":"public function restore(): false|int","summary":"Restores a soft-deleted record by writing the restore values together with its other changed attributes.","return":{"type":"false|int","description":"Number of restored rows; `0` for an unsaved record, when no value differs from the loaded ones, or when no row matched; `false` when a hook or event handler cancels the restoration."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the restore values cannot be inferred or an owner requirement is not met."},{"type":"yii\\db\\StaleObjectException","description":"When the optimistic lock value is invalid, cannot be incremented, or is outdated."},{"type":"RuntimeException","description":"When a rollback fails after an exception."}]},"restoreInternal":{"signature":"protected function restoreInternal(): int","summary":"Writes the restore values together with the other changed owner attributes.","return":{"type":"int","description":"Number of restored rows."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the restore values cannot be inferred or the primary key is not loaded."},{"type":"yii\\db\\StaleObjectException","description":"When the optimistic lock value is invalid, cannot be incremented, or is outdated."}],"visibility":"protected"},"safeDelete":{"signature":"public function safeDelete(): false|int","summary":"Deletes the row physically and marks the record as deleted instead when the database rejects the delete with `$deleteFallbackException`.","return":{"type":"false|int","description":"Number of deleted or marked rows; `0` for an unsaved record or when no row matched; `false` when a hook or event handler cancels the operation."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the owner or `$deleteFallbackException` is invalid."},{"type":"yii\\db\\StaleObjectException","description":"When the optimistic lock value is invalid, cannot be incremented, or is outdated."},{"type":"RuntimeException","description":"When a rollback fails after an exception."}]},"softDelete":{"signature":"public function softDelete(): false|int","summary":"Marks the record as deleted by writing `$softDeleteAttributeValues` together with its other changed attributes, or deletes it physically when `$allowDeleteCallback` allows it.","return":{"type":"false|int","description":"Number of affected rows; `0` for an unsaved record, when no value differs from the loaded ones, or when no row matched; `false` when a hook or event handler cancels the operation."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When `$allowDeleteCallback` is invalid or an owner requirement is not met."},{"type":"yii\\db\\StaleObjectException","description":"When the optimistic lock value is invalid, cannot be incremented, or is outdated."},{"type":"RuntimeException","description":"When a rollback fails after an exception."}]},"softDeleteInternal":{"signature":"protected function softDeleteInternal(): false|int","summary":"Runs the soft-delete hooks around writing `$softDeleteAttributeValues` with the other changed attributes.","return":{"type":"false|int","description":"Number of rows marked as deleted, or `false` when a hook or event handler cancels."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the primary key is not loaded or an owner hook is not public."},{"type":"yii\\db\\StaleObjectException","description":"When the optimistic lock value is invalid, cannot be incremented, or is outdated."}],"visibility":"protected"}},"events":{"EVENT_AFTER_RESTORE":{"value":"'afterRestore'","type":"yii\\base\\Event","description":"Triggered after a record is restored."},"EVENT_AFTER_SOFT_DELETE":{"value":"'afterSoftDelete'","type":"yii\\base\\Event","description":"Triggered after a record is marked as deleted."},"EVENT_BEFORE_RESTORE":{"value":"'beforeRestore'","type":"yii\\base\\ModelEvent","description":"Triggered before a record is restored; set `yii\\base\\ModelEvent::$isValid` to `false` to cancel."},"EVENT_BEFORE_SOFT_DELETE":{"value":"'beforeSoftDelete'","type":"yii\\base\\ModelEvent","description":"Triggered before a record is marked as deleted; set `yii\\base\\ModelEvent::$isValid` to `false` to cancel."}},"inherited":{"properties":{"owner":"yii\\base\\Behavior"},"methods":{"__call":"yii\\base\\BaseObject","__construct":"yii\\base\\BaseObject","__get":"yii\\base\\BaseObject","__isset":"yii\\base\\BaseObject","__set":"yii\\base\\BaseObject","__unset":"yii\\base\\BaseObject","attach":"yii\\base\\Behavior","canGetProperty":"yii\\base\\BaseObject","canSetProperty":"yii\\base\\BaseObject","className":"yii\\base\\BaseObject","detach":"yii\\base\\Behavior","hasMethod":"yii\\base\\BaseObject","hasProperty":"yii\\base\\BaseObject","init":"yii\\base\\BaseObject"}}},"yii2\\extensions\\softdelete\\QueryBehavior":{"kind":"class","url":"https://yii2-framework.github.io/docs/extensions/soft-delete/reference/querybehavior/","summary":"Scopes SQL `yii\\db\\ActiveQuery` results to records that are, or are not, marked as deleted by `yii2\\extensions\\softdelete\\DeleteBehavior`.","extends":"yii\\base\\Behavior","implements":["yii\\base\\Configurable"],"properties":{"deletedCondition":{"type":"array<array-key, mixed>","description":"Condition that selects deleted records.","virtual":true},"notDeletedCondition":{"type":"array<array-key, mixed>","description":"Condition that selects records that are not deleted.","virtual":true}},"methods":{"addFilterCondition":{"signature":"protected function addFilterCondition(array<array-key, mixed> $condition): yii\\db\\ActiveQuery","summary":"Replaces the soft-delete scope of the owner query with the given condition.","params":[{"name":"$condition","type":"array<array-key, mixed>","description":"Condition that selects the scoped records."}],"return":{"type":"yii\\db\\ActiveQuery","description":"The owner query."},"visibility":"protected"},"defaultDeletedCondition":{"signature":"protected function defaultDeletedCondition(): array<array-key, mixed>","summary":"Builds the condition that matches the model's soft-delete values.","return":{"type":"array<array-key, mixed>"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the query model has no `yii2\\extensions\\softdelete\\DeleteBehavior`, or a computed value has a restore value other than `null`."}],"visibility":"protected"},"defaultNotDeletedCondition":{"signature":"protected function defaultNotDeletedCondition(): array<array-key, mixed>","summary":"Builds the condition that matches the model's restore values without invoking any computed value.","return":{"type":"array<array-key, mixed>"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the query model has no `yii2\\extensions\\softdelete\\DeleteBehavior`, its restore values cannot be inferred, or one of them is computed."}],"visibility":"protected"},"deleted":{"signature":"public function deleted(): yii\\db\\ActiveQuery","summary":"Restricts the owner query to deleted records, replacing any soft-delete scope applied before.","return":{"type":"yii\\db\\ActiveQuery","description":"The owner query."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the default condition cannot be built for the query model."}]},"filterDeleted":{"signature":"public function filterDeleted(mixed $deleted): yii\\db\\ActiveQuery","summary":"Applies the soft-delete scope selected by a filter value.","params":[{"name":"$deleted","type":"mixed"}],"return":{"type":"yii\\db\\ActiveQuery","description":"The owner query."},"throws":[{"type":"InvalidArgumentException","description":"When the value is not one of the accepted values."},{"type":"yii\\base\\InvalidConfigException","description":"When the default condition cannot be built for the query model."}]},"getDeletedCondition":{"signature":"public function getDeletedCondition(): array<array-key, mixed>","summary":"Returns the condition that selects deleted records, building the default one on first use.","return":{"type":"array<array-key, mixed>","description":"Condition that selects deleted records."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the default condition cannot be built for the query model."}]},"getModelInstance":{"signature":"protected function getModelInstance(): yii\\db\\BaseActiveRecord","summary":"Returns the model instance of the owner query.","return":{"type":"yii\\db\\BaseActiveRecord"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the query model is not an ActiveRecord."}],"visibility":"protected"},"getNotDeletedCondition":{"signature":"public function getNotDeletedCondition(): array<array-key, mixed>","summary":"Returns the condition that selects records that are not deleted, building the default one on first use.","return":{"type":"array<array-key, mixed>","description":"Condition that selects records that are not deleted."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the default condition cannot be built for the query model."}]},"normalizeFilterCondition":{"signature":"protected function normalizeFilterCondition(array<array-key, mixed> $condition): yii2\\extensions\\softdelete\\Condition","summary":"Wraps the condition as a soft-delete scope qualified with the current primary table alias.","params":[{"name":"$condition","type":"array<array-key, mixed>","description":"Condition that selects the scoped records."}],"return":{"type":"yii2\\extensions\\softdelete\\Condition"},"visibility":"protected"},"notDeleted":{"signature":"public function notDeleted(): yii\\db\\ActiveQuery","summary":"Restricts the owner query to records that are not deleted, replacing any soft-delete scope applied before.","return":{"type":"yii\\db\\ActiveQuery","description":"The owner query."},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the default condition cannot be built for the query model."}]},"setDeletedCondition":{"signature":"public function setDeletedCondition(array<array-key, mixed>|null $deletedCondition): void","summary":"Sets the condition used to select soft-deleted records.","params":[{"name":"$deletedCondition","type":"array<array-key, mixed>|null","description":"Condition that selects deleted records, or `null` to use the default one."}],"return":{"type":"void"}},"setNotDeletedCondition":{"signature":"public function setNotDeletedCondition(array<array-key, mixed>|null $notDeletedCondition): void","summary":"Sets the condition used to select records that are not soft-deleted.","params":[{"name":"$notDeletedCondition","type":"array<array-key, mixed>|null","description":"Condition that selects records that are not deleted, or `null` to use the default one."}],"return":{"type":"void"}},"withDeleted":{"signature":"public function withDeleted(): yii\\db\\ActiveQuery","summary":"Removes the soft-delete scope from the owner query and keeps its other conditions.","return":{"type":"yii\\db\\ActiveQuery"},"throws":[{"type":"yii\\base\\InvalidConfigException","description":"When the behavior is not attached to a SQL ActiveQuery."}]}},"inherited":{"properties":{"owner":"yii\\base\\Behavior"},"methods":{"__call":"yii\\base\\BaseObject","__construct":"yii\\base\\BaseObject","__get":"yii\\base\\BaseObject","__isset":"yii\\base\\BaseObject","__set":"yii\\base\\BaseObject","__unset":"yii\\base\\BaseObject","attach":"yii\\base\\Behavior","canGetProperty":"yii\\base\\BaseObject","canSetProperty":"yii\\base\\BaseObject","className":"yii\\base\\BaseObject","detach":"yii\\base\\Behavior","events":"yii\\base\\Behavior","hasMethod":"yii\\base\\BaseObject","hasProperty":"yii\\base\\BaseObject","init":"yii\\base\\BaseObject"}}},"yii2\\extensions\\softdelete\\ScopedQuery":{"kind":"class","url":"https://yii2-framework.github.io/docs/extensions/soft-delete/reference/scopedquery/","summary":"SQL ActiveQuery that retains its soft-delete scope when `alias()` changes the primary table alias.","extends":"yii\\db\\ActiveQuery","implements":["yii\\db\\ActiveQueryInterface","yii\\base\\Configurable","yii\\db\\QueryInterface","yii\\db\\ExpressionInterface"],"traits":["yii\\db\\ActiveQueryTrait","yii\\db\\ActiveRelationTrait","yii\\db\\QueryTrait"],"methods":{"__clone":{"signature":"public function __clone(): mixed","summary":"Keeps the `softDelete` behavior of the cloned query, with its configured conditions, on the clone.","return":{"type":"mixed"}},"alias":{"signature":"public function alias(string $alias): static","summary":"Sets the primary table alias and re-qualifies the soft-delete scope with it.","params":[{"name":"$alias","type":"string","description":"Table alias, with or without `{{` and `}}` quoting."}],"return":{"type":"static"}},"behaviors":{"signature":"public function behaviors(): array<string, class-string<yii2\\extensions\\softdelete\\QueryBehavior>>","summary":"Declares `yii2\\extensions\\softdelete\\QueryBehavior` as the `softDelete` behavior.","return":{"type":"array<string, class-string<yii2\\extensions\\softdelete\\QueryBehavior>>"}},"deleted":{"signature":"public function deleted(): $this","return":{"type":"$this"},"virtual":true},"filterDeleted":{"signature":"public function filterDeleted(mixed $deleted): $this","params":[{"name":"$deleted","type":"mixed"}],"return":{"type":"$this"},"virtual":true},"notDeleted":{"signature":"public function notDeleted(): $this","return":{"type":"$this"},"virtual":true},"withDeleted":{"signature":"public function withDeleted(): $this","return":{"type":"$this"},"virtual":true}},"inherited":{"properties":{"asArray":"yii\\db\\ActiveQueryTrait","behaviors":"yii\\base\\Component","distinct":"yii\\db\\Query","emulateExecution":"yii\\db\\QueryTrait","from":"yii\\db\\Query","groupBy":"yii\\db\\Query","having":"yii\\db\\Query","indexBy":"yii\\db\\QueryTrait","inverseOf":"yii\\db\\ActiveRelationTrait","join":"yii\\db\\Query","joinWith":"yii\\db\\ActiveQuery","limit":"yii\\db\\QueryTrait","link":"yii\\db\\ActiveRelationTrait","modelClass":"yii\\db\\ActiveQueryTrait","multiple":"yii\\db\\ActiveRelationTrait","offset":"yii\\db\\QueryTrait","on":"yii\\db\\ActiveQuery","orderBy":"yii\\db\\QueryTrait","params":"yii\\db\\Query","primaryModel":"yii\\db\\ActiveRelationTrait","queryCacheDependency":"yii\\db\\Query","queryCacheDuration":"yii\\db\\Query","select":"yii\\db\\Query","selectOption":"yii\\db\\Query","sql":"yii\\db\\ActiveQuery","tablesUsedInFrom":"yii\\db\\Query","union":"yii\\db\\Query","unionLimit":"yii\\db\\Query","unionOffset":"yii\\db\\Query","unionOrderBy":"yii\\db\\Query","via":"yii\\db\\ActiveRelationTrait","where":"yii\\db\\QueryTrait","with":"yii\\db\\ActiveQueryTrait","withQueries":"yii\\db\\Query"},"methods":{"__call":"yii\\base\\Component","__construct":"yii\\db\\ActiveQuery","__get":"yii\\base\\Component","__isset":"yii\\base\\Component","__set":"yii\\base\\Component","__toString":"yii\\db\\Query","__unset":"yii\\base\\Component","addGroupBy":"yii\\db\\Query","addOrderBy":"yii\\db\\QueryTrait","addParams":"yii\\db\\Query","addSelect":"yii\\db\\Query","addUnionOrderBy":"yii\\db\\Query","all":"yii\\db\\ActiveQuery","andFilterCompare":"yii\\db\\Query","andFilterHaving":"yii\\db\\Query","andFilterWhere":"yii\\db\\QueryTrait","andHaving":"yii\\db\\Query","andOnCondition":"yii\\db\\ActiveQuery","andWhere":"yii\\db\\Query","asArray":"yii\\db\\ActiveQuery","attachBehavior":"yii\\base\\Component","attachBehaviors":"yii\\base\\Component","average":"yii\\db\\Query","batch":"yii\\db\\ActiveQuery","cache":"yii\\db\\Query","canGetProperty":"yii\\base\\Component","canSetProperty":"yii\\base\\Component","className":"yii\\base\\BaseObject","cleanUpTableNames":"yii\\db\\Query","column":"yii\\db\\Query","count":"yii\\db\\Query","create":"yii\\db\\Query","createCommand":"yii\\db\\ActiveQuery","createModels":"yii\\db\\ActiveQueryTrait","detachBehavior":"yii\\base\\Component","detachBehaviors":"yii\\base\\Component","distinct":"yii\\db\\Query","each":"yii\\db\\ActiveQuery","emulateExecution":"yii\\db\\QueryTrait","ensureBehaviors":"yii\\base\\Component","exists":"yii\\db\\Query","filterCondition":"yii\\db\\QueryTrait","filterHaving":"yii\\db\\Query","filterWhere":"yii\\db\\QueryTrait","findFor":"yii\\db\\ActiveRelationTrait","findWith":"yii\\db\\ActiveQueryTrait","from":"yii\\db\\Query","getBehavior":"yii\\base\\Component","getBehaviors":"yii\\base\\Component","getPrimaryTableName":"yii\\db\\ActiveQuery","getTableNameAndAlias":"yii\\db\\ActiveQuery","getTablesUsedInFrom":"yii\\db\\ActiveQuery","groupBy":"yii\\db\\Query","hasEventHandlers":"yii\\base\\Component","hasMethod":"yii\\base\\Component","hasProperty":"yii\\base\\Component","having":"yii\\db\\Query","indexBy":"yii\\db\\QueryTrait","init":"yii\\db\\ActiveQuery","innerJoin":"yii\\db\\Query","innerJoinWith":"yii\\db\\ActiveQuery","inverseOf":"yii\\db\\ActiveRelationTrait","isEmpty":"yii\\db\\QueryTrait","join":"yii\\db\\Query","joinWith":"yii\\db\\ActiveQuery","leftJoin":"yii\\db\\Query","limit":"yii\\db\\QueryTrait","max":"yii\\db\\Query","min":"yii\\db\\Query","noCache":"yii\\db\\Query","normalizeOrderBy":"yii\\db\\QueryTrait","normalizeSelect":"yii\\db\\Query","off":"yii\\base\\Component","offset":"yii\\db\\QueryTrait","on":"yii\\base\\Component","onCondition":"yii\\db\\ActiveQuery","one":"yii\\db\\ActiveQuery","orderBy":"yii\\db\\QueryTrait","orFilterHaving":"yii\\db\\Query","orFilterWhere":"yii\\db\\QueryTrait","orHaving":"yii\\db\\Query","orOnCondition":"yii\\db\\ActiveQuery","orWhere":"yii\\db\\Query","params":"yii\\db\\Query","populate":"yii\\db\\ActiveQuery","populateRelation":"yii\\db\\ActiveRelationTrait","prepare":"yii\\db\\ActiveQuery","queryScalar":"yii\\db\\ActiveQuery","rightJoin":"yii\\db\\Query","scalar":"yii\\db\\Query","select":"yii\\db\\Query","setCommandCache":"yii\\db\\Query","sum":"yii\\db\\Query","trigger":"yii\\base\\Component","union":"yii\\db\\Query","unionLimit":"yii\\db\\Query","unionOffset":"yii\\db\\Query","unionOrderBy":"yii\\db\\Query","via":"yii\\db\\ActiveRelationTrait","viaTable":"yii\\db\\ActiveQuery","where":"yii\\db\\Query","with":"yii\\db\\ActiveQueryTrait","withQuery":"yii\\db\\Query"},"events":{"EVENT_INIT":"yii\\db\\ActiveQuery"}}},"yii2\\extensions\\softdelete\\exception\\Message":{"kind":"enum","url":"https://yii2-framework.github.io/docs/extensions/soft-delete/reference/exception/message/","summary":"Defines soft-delete exception message templates.","backingType":"string","cases":{"ALLOW_DELETE_CALLBACK_INVALID":{"value":"\"'allowDeleteCallback' must be 'callable' and return a 'boolean'.\"","description":"Error when the delete callback is not callable or does not return a boolean."},"COMPUTED_MARKER_REQUIRES_DELETED_CONDITION":{"value":"\"'deletedCondition' must be configured for a computed marker \" . 'with a non-null active value.'","description":"Error when a computed soft-delete marker has a non-null restore value and no explicit deleted condition."},"COMPUTED_RESTORE_VALUE_REQUIRES_NOT_DELETED_CONDITION":{"value":"\"'notDeletedCondition' must be configured when \" . 'restore values are computed.'","description":"Error when a restore value is computed and no explicit not-deleted condition is configured."},"CONDITION_OPERATOR_MUST_BE_STRING":{"value":"\"Soft-delete condition operator must be a 'string'.\"","description":"Error when a soft-delete condition operator is not a string."},"DELETE_BEHAVIOR_REQUIRES_ACTIVE_RECORD_OWNER":{"value":"\"'DeleteBehavior' requires a 'BaseActiveRecord' owner.\"","description":"Error when the soft-delete behavior is not attached to an ActiveRecord."},"DELETE_FALLBACK_EXCEPTION_INVALID":{"value":"\"'deleteFallbackException' must name a 'Throwable' type.\"","description":"Error when the delete fallback exception does not name a throwable type."},"DELETED_OBJECT_OUTDATED":{"value":"'The object being deleted is outdated.'","description":"Error when the optimistic lock no longer matches the row being deleted."},"FILTER_VALUE_UNKNOWN":{"value":"'Unknown soft-delete filter value.'","description":"Error when a soft-delete filter value is not one of the accepted values."},"HOOK_MUST_BE_PUBLIC":{"value":"\"ActiveRecord hook '%s' must be public.\"","description":"Error when an owner hook is declared with a visibility other than public."},"OPTIMISTIC_LOCK_CANNOT_BE_INCREMENTED":{"value":"'Optimistic lock value cannot be incremented.'","description":"Error when the optimistic lock value cannot be incremented."},"OPTIMISTIC_LOCK_MUST_BE_NON_NEGATIVE_INTEGER":{"value":"\"Optimistic lock value must be a non-negative 'integer'.\"","description":"Error when the optimistic lock value is not a non-negative integer."},"PERSISTED_PRIMARY_KEY_REQUIRED":{"value":"'Persisted primary key is required for deletion or restoration.'","description":"Error when the record has no complete persisted primary key."},"QUERY_BEHAVIOR_REQUIRES_ACTIVE_QUERY_OWNER":{"value":"\"'QueryBehavior' requires a SQL 'ActiveQuery' owner.\"","description":"Error when the query behavior is not attached to a SQL ActiveQuery."},"QUERY_MODEL_MUST_EXTEND_BASE_ACTIVE_RECORD":{"value":"\"The query model must extend 'BaseActiveRecord'.\"","description":"Error when the query model does not extend BaseActiveRecord."},"QUERY_MODEL_MUST_HAVE_DELETE_BEHAVIOR":{"value":"\"The query model must have a 'DeleteBehavior'.\"","description":"Error when the query model has no soft-delete behavior."},"RESTORE_ATTRIBUTE_VALUES_NOT_INFERABLE":{"value":"'Unable to determine restore attribute values automatically; ' . \"'%s::restoreAttributeValues' must be set explicitly.\"","description":"Error when the restore values cannot be inferred from the soft-delete values."},"ROLLBACK_FAILED":{"value":"\"Unable to complete rollback; '%s'.\"","description":"Error when a rollback fails after the exception that caused it."},"SAFE_DELETE_REQUIRES_ACTIVE_RECORD":{"value":"\"'safeDelete()' requires a SQL 'ActiveRecord' owner.\"","description":"Error when a safe delete is requested on a record that is not a SQL ActiveRecord."},"TRANSACTION_REQUIRES_SQL_CONNECTION":{"value":"\"Transactional soft delete or restore requires a Yii SQL 'Connection'.\"","description":"Error when a transactional operation runs on an owner without a Yii SQL connection."},"UPDATED_OBJECT_OUTDATED":{"value":"'The object being updated is outdated.'","description":"Error when the optimistic lock no longer matches the row being updated."}},"methods":{"getMessage":{"signature":"public function getMessage(int|string ...$argument): string","summary":"Returns the formatted message string for the error case.","params":[{"name":"$argument","type":"int|string","optional":true,"variadic":true,"description":"Values to insert into the message template."}],"return":{"type":"string"}}}}}}
