/**
  * {@inheritDoc}
  */
 public function setParentRule(\Mtg\Model\Rule $parentRule)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setParentRule', array($parentRule));
     return parent::setParentRule($parentRule);
 }
示例#2
0
 /**
  * @param Rule $rule
  * @return Rule
  */
 public function addChildRule(Rule $rule)
 {
     if ($this !== $rule->getParentRule()) {
         $rule->setParentRule($this);
     }
     $this->childRules[$rule->getSubId()] = $rule;
     return $this;
 }