default template type props
This commit is contained in:
@@ -36,7 +36,7 @@ use Espo\ORM\Repository\Option\MassRelateOptions;
|
||||
/**
|
||||
* An afterMassRelate hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
*/
|
||||
interface AfterMassRelate
|
||||
{
|
||||
|
||||
@@ -35,7 +35,8 @@ use Espo\ORM\Repository\Option\RelateOptions;
|
||||
/**
|
||||
* An afterRelate hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
* @template TRelatedEntity of Entity = Entity
|
||||
*/
|
||||
interface AfterRelate
|
||||
{
|
||||
@@ -44,7 +45,7 @@ interface AfterRelate
|
||||
*
|
||||
* @param TEntity $entity An entity.
|
||||
* @param string $relationName A relation name.
|
||||
* @param Entity $relatedEntity An entity is being related.
|
||||
* @param TRelatedEntity $relatedEntity An entity is being related.
|
||||
* @param array<string, mixed> $columnData Middle table role values.
|
||||
* @param RelateOptions $options Options.
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ use Espo\ORM\Repository\Option\RemoveOptions;
|
||||
/**
|
||||
* An afterRemove hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
*/
|
||||
interface AfterRemove
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ use Espo\ORM\Repository\Option\SaveOptions;
|
||||
/**
|
||||
* An afterSave hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
*/
|
||||
interface AfterSave
|
||||
{
|
||||
|
||||
@@ -35,7 +35,8 @@ use Espo\ORM\Repository\Option\UnrelateOptions;
|
||||
/**
|
||||
* An afterUnrelate hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
* @template TRelatedEntity of Entity = Entity
|
||||
*/
|
||||
interface AfterUnrelate
|
||||
{
|
||||
@@ -44,7 +45,7 @@ interface AfterUnrelate
|
||||
*
|
||||
* @param TEntity $entity An entity.
|
||||
* @param string $relationName A relation name.
|
||||
* @param Entity $relatedEntity An entity is being unrelated.
|
||||
* @param TRelatedEntity $relatedEntity An entity is being unrelated.
|
||||
* @param UnrelateOptions $options Options.
|
||||
*/
|
||||
public function afterUnrelate(
|
||||
|
||||
@@ -35,7 +35,7 @@ use Espo\ORM\Repository\Option\RemoveOptions;
|
||||
/**
|
||||
* An beforeRemove hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
*/
|
||||
interface BeforeRemove
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ use Espo\ORM\Repository\Option\SaveOptions;
|
||||
/**
|
||||
* A beforeSave hook.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
*/
|
||||
interface BeforeSave
|
||||
{
|
||||
|
||||
@@ -42,13 +42,6 @@ use Espo\ORM\Repository\Option\SaveOptions;
|
||||
use Espo\ORM\Repository\Option\UnrelateOptions;
|
||||
use Espo\Tools\Stream\HookProcessor;
|
||||
|
||||
/**
|
||||
* @implements BeforeSave<Entity>
|
||||
* @implements AfterSave<Entity>
|
||||
* @implements AfterRemove<Entity>
|
||||
* @implements AfterRelate<Entity>
|
||||
* @implements AfterUnrelate<Entity>
|
||||
*/
|
||||
class Stream implements BeforeSave, AfterSave, AfterRemove, AfterRelate, AfterUnrelate
|
||||
{
|
||||
public static int $order = 9;
|
||||
|
||||
@@ -42,7 +42,7 @@ use Closure;
|
||||
/**
|
||||
* A standard collection of entities. It allocates a memory for all entities.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @template TEntity of Entity = Entity
|
||||
* @implements Iterator<int, TEntity>
|
||||
* @implements Collection<TEntity>
|
||||
* @implements ArrayAccess<int, TEntity>
|
||||
|
||||
Reference in New Issue
Block a user