/**
* Constructor
*
* @param \Cake\ORM\Table $table Table who requested the behavior.
* @param array $config Options.
*/
public function __construct(Table $table, array $config = [])
{
parent::__construct($table, $config);
$this->Table = $table;
if ($this->config('created_by')) {
$this->Table->belongsTo('CreatedBy', ['foreignKey' => $this->config('created_by'), 'className' => $this->config('userModel'), 'propertyName' => $this->config('createdByPropertyName')]);
}
if ($this->config('modified_by')) {
$this->Table->belongsTo('ModifiedBy', ['foreignKey' => $this->config('modified_by'), 'className' => $this->config('userModel'), 'propertyName' => $this->config('modifiedByPropertyName')]);
}
}