Checks that a list of fields from an entity are unique in the table
string[]
The list of fields to check
__construct(array $fields)
Constructor.
string[]
$fields The list of fields to check uniqueness for
__invoke(\Cake\Datasource\EntityInterface $entity, array $options)
Performs the uniqueness check
\Cake\Datasource\EntityInterface
$entity The entity from where to extract the fields where the repository
key is required.
array
$options Options passed to the check,
bool
_alias(string $alias, array $conditions)
Add a model alias to all the keys in a set of conditions.
string
$alias The alias to add.
array
$conditions The conditions to alias.
array
The list of fields to check
string[]
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.ORM.Rule.IsUnique.html