Exemplo n.º 1
0
 public function __construct($kwargs)
 {
     if (!isset($kwargs['rel']) || isset($kwargs['rel']) && $kwargs['rel'] == null) {
         $kwargs['rel'] = ManyToOneRel::createObject(['fromField' => $this, 'to' => ArrayHelper::getValue($kwargs, 'to'), 'toField' => ArrayHelper::getValue($kwargs, 'toField'), 'parentLink' => ArrayHelper::getValue($kwargs, 'parentLink'), 'onDelete' => ArrayHelper::getValue($kwargs, 'onDelete', Delete::CASCADE)]);
     }
     $this->toField = ArrayHelper::getValue($kwargs, 'toField');
     $this->fromField = 'this';
     parent::__construct($kwargs);
 }
Exemplo n.º 2
0
 public function checks()
 {
     $checks = parent::checks();
     $checks = array_merge($checks, $this->_checkIgnoredKwargOptions());
     return $checks;
 }