insertRow() public méthode

Adds a new row to the entity table
public insertRow ( stdClas\stdClass $row, array $attributes = [] ) : integer | false
$row stdClas\stdClass Entity base information
$attributes array All primary and secondary table attributes Used by database mock services to allow mocking entities that were instantiated using new keyword and calling ElggEntity::save()
Résultat integer | false
Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function insertRow(stdClass $row, array $attributes = [])
 {
     $subtype = isset($row->subtype) ? $row->subtype : null;
     $this->setup(null, $row->type, $subtype, array_merge($attributes, (array) $row));
     return parent::insertRow($row);
 }