Search tables in db for keyField; if found search key constraints
for the table to which it refers.
public findTableReferencedBy ( Cake\Database\Schema\Table $schema, string $keyField ) : string | null | ||
$schema | Cake\Database\Schema\Table | The table schema to find a constraint for. |
$keyField | string | The field to check for a constraint. |
return | string | null | Either the referenced table or null if the field has no constraints. |