Ejemplo n.º 1
0
 /**
  * Creates a new record in the specified portal.
  *
  * @param string $relatedSet Name of the portal to create a new record in.
  *
  * @return Record A new, blank record.
  * @throws FileMakerException
  */
 public function newRelatedRecord($relatedSet)
 {
     $relatedSetInfos = $this->layout->getRelatedSet($relatedSet);
     if (FileMaker::isError($relatedSetInfos)) {
         return $relatedSetInfos;
     }
     $record = new Record($relatedSetInfos);
     $record->setParent($this);
     $record->relatedSetName = $relatedSet;
     return $record;
 }
Ejemplo n.º 2
0
 /**
  * @covers \airmoi\FileMaker\Object\Record::setParent
  * @todo   Implement testSetParent().
  */
 public function testSetParent()
 {
     $record = new Record($this->record->getLayout());
     $record->setParent($this->record);
     $this->assertEquals($this->record, $record->getParent());
 }