FOF30\Model\DataModel\Relation\BelongsToMany::getNew PHP Method

getNew() public method

This is not supported by the belongsTo relation
public getNew ( )
    public function getNew()
    {
        throw new DataModel\Relation\Exception\NewNotSupported("getNew() is not supported for many-to-may relations. Please add/remove items from the relation data and use push() to effect changes.");
    }

Usage Example

Esempio n. 1
0
 /**
  * @group       BelongsToMany
  * @group       BelongsToManyGetNew
  * @covers      FOF30\Model\DataModel\Relation\BelongsToMany::getNew
  */
 public function testGetNew()
 {
     $model = new Groups(static::$container);
     $relation = new BelongsToMany($model, 'Parts');
     $this->setExpectedException('FOF30\\Model\\DataModel\\Relation\\Exception\\NewNotSupported');
     $relation->getNew();
 }