Skip to content

Blameable

  • Full name: \Zemit\Mvc\Model\Traits\Blameable

Methods

initializeBlameable

Initialize Blameable

public initializeBlameable(array|null $options = null): void

Parameters:

Parameter Type Description
$options **array null**

setBlameableBehavior

Set Blameable Behavior.

public setBlameableBehavior(\Zemit\Mvc\Model\Behavior\Blameable $blameableBehavior): void

Parameters:

Parameter Type Description
$blameableBehavior \Zemit\Mvc\Model\Behavior\Blameable The BlameableBehavior instance to set.

getBlameableBehavior

Retrieves the BlameableBehavior instance associated with the current object.

public getBlameableBehavior(): \Zemit\Mvc\Model\Behavior\Blameable

Return Value:

The BlameableBehavior instance.


addUserRelationship

Adds a relationship between the current object and a user entity.

public addUserRelationship(string $field = 'userId', string $alias = 'UserEntity', array $params = [], string $ref = 'id', string $type = 'belongsTo', string|null $class = null): \Phalcon\Mvc\Model\Relation|null

Parameters:

Parameter Type Description
$field string The field name to create the relationship on. Default is 'userId'.
$alias string The alias name for the user entity. Default is 'UserEntity'.
$params array Additional parameters for the relationship. Default is an empty array.
$ref string The reference field in the user entity. Default is 'id'.
$type string The type of relationship to create. Default is 'belongsTo'.
$class **string null**

Return Value:

The created relationship object, or null if the specified field does not exist in the current object.