\Cake\ORM\RuleValidCount

Validates the count of associated records.

Summary

Methods
Properties
Constants
__construct()
__invoke()
No public properties found
No constants found
No protected methods found
$_field
N/A
No private methods found
No private properties found
N/A

Properties

$_field

$_field : string

The field to check

Type

string

Methods

__construct()

__construct(string  $field) 

Constructor.

Parameters

string $field

The field to check the count on.

__invoke()

__invoke(\Cake\Datasource\EntityInterface  $entity, array  $options) : boolean

Performs the count check

Parameters

\Cake\Datasource\EntityInterface $entity

The entity from where to extract the fields.

array $options

Options passed to the check.

Returns

boolean —

True if successful, else false.