Inheritance: extends Cake\ORM\Behavior
Ejemplo n.º 1
0
 /**
  * Constructor hook method.
  *
  * @param array $config The configuration settings provided to this behavior.
  * @return void
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->validateEmail = (bool) Configure::read('Users.Email.validate');
     $this->useTos = (bool) Configure::read('Users.Tos.required');
     $this->Email = new EmailSender();
 }
Ejemplo n.º 2
0
 /**
  * Initialize, attaching belongsTo Users association
  *
  * @param array $config config
  * @return void
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->_table->belongsTo('Users', ['foreignKey' => 'user_id', 'joinType' => 'INNER', 'className' => Configure::read('Users.table')]);
 }
Ejemplo n.º 3
0
 /**
  * Constructor hook method.
  *
  * @param array $config The configuration settings provided to this behavior.
  * @return void
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->Email = new EmailSender();
 }