public function __construct($name, $flags = 0, $link, $destination, $local_key = null, $remote_key = null) { parent::__construct($name, $flags, $link, $destination, $local_key, $remote_key); $relationFlags = ManyToOneRelation::AF_MANYTOONE_AUTOCOMPLETE | self::AF_HIDE; $relation = new ManyToOneRelation($this->fieldName() . '_m2msr_add', $relationFlags, $this->m_destination); $relation->setDisabledModes(self::DISABLED_VIEW | self::DISABLED_EDIT); $relation->setLoadType(self::NOLOAD); $relation->setStorageType(self::NOSTORE); $this->m_manyToOneRelation = $relation; }
/** * Constructor. * * @param string $name Name of the attribute * @param int $flags Flags for the relation * @param string $destination Destination node for this relation * */ public function __construct($name, $flags = 0, $destination) { parent::__construct($name, $flags, $destination); }
public function value2db($record) { $record[$this->fieldName()] = $this->initialValue(); return parent::value2db($record); }