public function __construct($parent, $name, $title = null, $options = null) { parent::__construct($parent, $name, $title, $options); list($parentClass, $componentClass, $parentField, $componentField, $table) = $parent->many_many($this->name); $this->parentField = $parentField; $this->componentField = $componentField; $this->joinTable = $table; $this->otherClass = $parent->class == $parentClass || ClassInfo::is_subclass_of($parent->class, $parentClass) ? $componentClass : $parentClass; }
public function __construct($parent, $name, $title = null, $options = null) { parent::__construct($parent, $name, $title, $options); $this->otherClass = $parent->has_one($this->name); }